Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
ea5b49eb
Commit
ea5b49eb
authored
Jun 15, 2022
by
Bryan BRANCOTTE
Browse files
Merge branch 'dockerizing-app-zolando' into 'dockerizing-app'
Use zolando See merge request
!40
parents
9d0a7083
5d9a2f51
Pipeline
#83440
passed with stages
in 5 minutes and 53 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
ea5b49eb
...
...
@@ -45,6 +45,9 @@ test-style:
test-sqlite
:
# As testing for sqlite is only informative, we only run it for master
only
:
-
master
extends
:
"
.test"
# needs: ["test-pg"] # needs should be set to test-pg when cache is not working in gitlab-ci to spare network resources
allow_failure
:
true
# test is mostly informative, sqlite is not in the scope
...
...
README.md
View file @
ea5b49eb
...
...
@@ -39,7 +39,7 @@ date
kubectl config use-context ippidb-dev
POD
=
$(
kubectl get po
-lapplication
=
spilo,cluster-name
=
$(
git branch
--show
)
-postgresql
--output
jsonpath
=
'{.items[0].metadata.name}'
)
;
echo
$POD
POD
=
$(
kubectl get po
-lapplication
=
spilo,cluster-name
=
$(
git branch
--show
)
-
zolando-
postgresql
--output
jsonpath
=
'{.items[0].metadata.name}'
)
;
echo
$POD
date
# 26 minutes
gzip
-d
-c
ippisite/db-django-4.0.sql.gz | kubectl
exec
--stdin
--tty
$POD
--
psql
...
...
chart/templates/deployment-postgres.yaml
View file @
ea5b49eb
...
...
@@ -14,6 +14,7 @@ spec:
{{
.Values.postgresql.dbUser
}}
:
[]
databases
:
{{
.Values.postgresql.dbName
}}
:
{{
.Values.postgresql.dbUser
}}
{{
- if .Values.postgresql.preparedDatabases
}}
preparedDatabases
:
{{
.Values.postgresql.dbName
}}
:
defaultUsers
:
false
...
...
@@ -22,12 +23,17 @@ spec:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
schemas
:
{}
{{
end
}}
postgresql
:
version
:
{{
.Values.postgresql.version | quote
}}
{{
- with .Values.postgresql.parameters
}}
{{
- if .
}}
parameters
:
# Expert section
shared_buffers
:
{{
.Values.postgresql.parameters.shared_buffers | quote
}}
max_connections
:
{{
.Values.postgresql.parameters.max_connections | quote
}}
log_statement
:
{{
.Values.postgresql.parameters.log_statement | quote
}}
{{
if .shared_buffers
}}
shared_buffers
:
{{
.shared_buffers | quote
}}{{
end
}}
{{
if .max_connections
}}
max_connections
:
{{
.max_connections | quote
}}{{
end
}}
{{
if .log_statement
}}
log_statement
:
{{
.log_statement | quote
}}{{
end
}}
{{
- end
}}
{{
- end
}}
volume
:
size
:
{{
.Values.postgresql.volume.size | quote
}}
storageClass
:
{{
.Values.postgresql.volume.storageClass | quote
}}
...
...
chart/values.yaml
View file @
ea5b49eb
...
...
@@ -101,9 +101,9 @@ redis:
postgresqlBackend
:
bitnami
:
enabled
:
true
zalando
:
enabled
:
false
zalando
:
enabled
:
true
postgresql
:
image
:
registry.opensource.zalan.do/acid/spilo-14
...
...
@@ -111,16 +111,16 @@ postgresql:
teamId
:
ippidb
dbUser
:
postgres
dbName
:
postgres
version
:
1
3
preparedDatabases
:
extensions
:
{}
version
:
1
4
#
preparedDatabases:
#
extensions: {}
parameters
:
shared_buffers
:
512
G
i
max_connections
:
100
log_statement
:
ALL
#
shared_buffers: 512
M
i
#
max_connections:
99
log_statement
:
none
volume
:
size
:
20Gi
storageClass
:
isilon
storageClass
:
'
isilon
'
resources
:
requests
:
memory
:
2Gi
...
...
docker-compose.yaml
View file @
ea5b49eb
...
...
@@ -3,6 +3,7 @@ version: "3.4"
services
:
db-local
:
image
:
postgres:14
# command: [ "postgres", "-c", "log_statement=all", ]
volumes
:
-
ippidb-dev-db-data:/var/lib/postgresql/data
-
./ippisite:/code
# for dev purpose only !!!
...
...
ippisite/ippidb/templates/targetcentric.html
View file @
ea5b49eb
...
...
@@ -234,7 +234,7 @@ Comparison and druggability prediction of protein-ligand binding sites from phar
<tbody>
{% for chain, cavities in infopdb0.items %}
{% with chaincount=forloop.counter %}
{% for cavity
, nearcavities
in cavities
.items
%}
{% for cavity in cavities %}
{% with cavcount=forloop.counter %}
<tr
id=
"cavity_{{ cavity.id }}"
class=
"table-light"
>
<th
class=
"zui-sticky-col text-nowrap"
>
...
...
@@ -310,7 +310,7 @@ Comparison and druggability prediction of protein-ligand binding sites from phar
<td>
{{ cavity.t110_120|floatformat:1 }}
</td>
<td>
{{ cavity.t120|floatformat:1 }}
</td>
</tr>
{% for distance in nearcavities %}
{% for distance in
cavity.
near
_
cavities %}
{% if cavity == distance.cavity1 %}
<tr
class=
"collapse out collapseme{{ chaincount }}_{{ cavcount }}"
style=
"background-color:rgb({{ distance.distance|get_zscore:avg_std|get_color }})"
>
<th
class=
"zui-sticky-col text-nowrap"
>
...
...
ippisite/ippidb/views/targetcentric.py
View file @
ea5b49eb
...
...
@@ -111,26 +111,26 @@ class PDBView(ListView):
pdb
=
context
[
"pdb_list"
][
0
].
id
).
select_related
(
"protein__organism"
)
for
chain
in
listchainspdb0
:
cavities
=
Cavity
.
objects
.
filter
(
chain
=
chain
.
id
).
select_related
(
"chain__protein__organism"
,
"partner__chain__protein__organism"
,
"partner__ligand"
,
"chain__protein__organism"
,
"partner__chain__protein__organism"
,
"partner__ligand"
,
)
infochain
=
{}
for
cavity
in
cavities
:
nearcavities
=
cavity
.
near_cavities
.
select_related
(
"cavity1__chain__protein__organism"
,
"cavity1__partner__chain__protein__organism"
,
"cavity1__partner__ligand"
,
"cavity2__chain__protein__organism"
,
"cavity2__partner__chain__protein__organism"
,
"cavity2__partner__ligand"
,
)
infochain
[
cavity
]
=
nearcavities
infopdb0
[
chain
]
=
infochain
#
cavities = Cavity.objects.filter(chain=chain.id).select_related(
#
"chain__protein__organism",
#
"partner__chain__protein__organism",
#
"partner__ligand",
#
"chain__protein__organism",
#
"partner__chain__protein__organism",
#
"partner__ligand",
#
)
#
infochain = {}
#
for cavity in cavities:
#
nearcavities = cavity.near_cavities.select_related(
#
"cavity1__chain__protein__organism",
#
"cavity1__partner__chain__protein__organism",
#
"cavity1__partner__ligand",
#
"cavity2__chain__protein__organism",
#
"cavity2__partner__chain__protein__organism",
#
"cavity2__partner__ligand",
#
)
#
infochain[cavity] = nearcavities
infopdb0
[
chain
]
=
Cavity
.
objects
.
filter
(
chain
=
chain
.
id
)
context
[
"infopdb0"
]
=
infopdb0
completionlistpdb
=
list
(
PDB
.
objects
.
all
().
values_list
(
"code"
,
flat
=
True
).
distinct
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment