Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odoo only depends on db if not using external db #159

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions common.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,7 +42,6 @@ services:
work_mem = 512MB
volumes:
- db:/var/lib/postgresql/data:z
{%- endif %}

smtpfake:
image: mailhog/mailhog
Expand Down
2 changes: 0 additions & 2 deletions devel.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ services:
- --dev=reload,qweb,werkzeug,xml
{%- endif %}

{% if postgres_version -%}
db:
extends:
file: common.yaml
service: db
environment:
POSTGRES_DB: *dbname
POSTGRES_PASSWORD: odoopassword
{%- endif %}

pgweb:
image: sosedoff/pgweb
Expand Down
5 changes: 4 additions & 1 deletion prod.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ services:
SMTP_SERVER: smtplocal
{%- endif %}
depends_on:
{%- if postgres_version %}
- db
{%- endif %}
{%- if smtp_relay_host %}
- smtp
{%- endif %}
Expand All @@ -45,7 +47,8 @@ services:
) }}
{%- endif %}

{% if postgres_version -%}
{%- if postgres_version %}

db:
extends:
file: common.yaml
Expand Down
2 changes: 0 additions & 2 deletions test.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ services:
- --workers=2
- --max-cron-threads=1

{% if postgres_version -%}
db:
extends:
file: common.yaml
service: db
env_file:
- .docker/db-creation.env
restart: unless-stopped
{%- endif %}

smtp:
extends:
Expand Down