diff --git a/common.yaml.jinja b/common.yaml.jinja index 85f137b8..f1cbdbc0 100644 --- a/common.yaml.jinja +++ b/common.yaml.jinja @@ -32,9 +32,8 @@ services: traefik.port: "8069" {%- endif %} - {% if postgres_version -%} db: - image: ghcr.io/tecnativa/postgres-autoconf:{{ postgres_version }}-alpine + image: ghcr.io/tecnativa/postgres-autoconf:{{ postgres_version or "13" }}-alpine shm_size: 512mb environment: POSTGRES_DB: *dbname @@ -43,7 +42,6 @@ services: work_mem = 512MB volumes: - db:/var/lib/postgresql/data:z - {%- endif %} smtpfake: image: mailhog/mailhog diff --git a/devel.yaml.jinja b/devel.yaml.jinja index fd6e58c6..26b81eef 100644 --- a/devel.yaml.jinja +++ b/devel.yaml.jinja @@ -75,7 +75,6 @@ services: - --dev=reload,qweb,werkzeug,xml {%- endif %} - {% if postgres_version -%} db: extends: file: common.yaml @@ -83,7 +82,6 @@ services: environment: POSTGRES_DB: *dbname POSTGRES_PASSWORD: odoopassword - {%- endif %} pgweb: image: sosedoff/pgweb diff --git a/prod.yaml.jinja b/prod.yaml.jinja index cf1b562b..ea6c9b24 100644 --- a/prod.yaml.jinja +++ b/prod.yaml.jinja @@ -20,7 +20,9 @@ services: SMTP_SERVER: smtplocal {%- endif %} depends_on: + {% if postgres_version -%} - db + {% endif -%} {%- if smtp_relay_host %} - smtp {%- endif %} @@ -45,7 +47,8 @@ services: ) }} {%- endif %} - {% if postgres_version -%} + {%- if postgres_version %} + db: extends: file: common.yaml diff --git a/test.yaml.jinja b/test.yaml.jinja index aadfc6bd..ce5ee26a 100644 --- a/test.yaml.jinja +++ b/test.yaml.jinja @@ -47,7 +47,6 @@ services: - --workers=2 - --max-cron-threads=1 - {% if postgres_version -%} db: extends: file: common.yaml @@ -55,7 +54,6 @@ services: env_file: - .docker/db-creation.env restart: unless-stopped - {%- endif %} smtp: extends: