Commit ea5b49eb authored by Bryan  BRANCOTTE's avatar 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
......@@ -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
......
......@@ -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
......
......@@ -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 }}
......
......@@ -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: 13
preparedDatabases:
extensions: {}
version: 14
# preparedDatabases:
# extensions: {}
parameters:
shared_buffers: 512Gi
max_connections: 100
log_statement: ALL
# shared_buffers: 512Mi
# max_connections: 99
log_statement: none
volume:
size: 20Gi
storageClass: isilon
storageClass: 'isilon'
resources:
requests:
memory: 2Gi
......
......@@ -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 !!!
......
......@@ -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">
......
......@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment