Skip to content

Commit

Permalink
upd: hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardo committed Sep 15, 2023
1 parent 832529c commit f4e4d11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 2 additions & 5 deletions common.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ services:
PGUSER: &dbuser "{{ postgres_username }}"
PROXY_MODE: "{% if odoo_proxy %}true{% else %}false{% endif %}"
LIST_DB: "{{ odoo_listdb | tojson }}"
{%- if smtp_canonical_default %}
hostname: "{{ smtp_canonical_default }}"
{%- endif %}
tty: true
volumes:
- filestore:/var/lib/odoo:z
Expand Down Expand Up @@ -54,7 +51,7 @@ services:

smtpreal:
image: ghcr.io/docker-mailserver/docker-mailserver:{{ smtp_relay_version }}
hostname: "smtp.{{ smtp_canonical_default }}"
hostname: "{{ smtp_canonical_default }}"
stop_grace_period: 1m
volumes:
- mailconfig:/tmp/docker-mailserver:z
Expand Down Expand Up @@ -87,7 +84,7 @@ services:

backup:
image: ghcr.io/tecnativa/docker-duplicity-postgres{% if backup_dst.startswith(('boto3+s3://', 's3://', 's3+http://')) %}-s3{% endif %}:{{ backup_image_version }}
hostname: backup{% if macros.first_main_domain(domains_prod) %}.{{ macros.first_main_domain(domains_prod) }}{% endif %}
hostname: backup.{% if domains_prod %}{{ macros.first_main_domain(domains_prod) }}{% else %}{{ project_name|replace('.','-') }}{% endif %}
init: true
environment:
DB_VERSION: "{{ postgres_version or 'latest' }}"
Expand Down
3 changes: 3 additions & 0 deletions prod.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ services:
file: common.yaml
service: odoo
restart: unless-stopped
{%- if domains_prod %}
hostname: "{{ macros.first_main_domain(domains_prod)|tojson }}"
{%- endif %}
env_file:
- .docker/odoo.env
- .docker/db-access.env
Expand Down
3 changes: 3 additions & 0 deletions test.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ services:
SMTP_PORT: "1025"
SMTP_SERVER: smtplocal
restart: unless-stopped
{%- if domains_test %}
hostname: "{{ macros.first_main_domain(domains_test)|tojson }}"
{%- endif %}
depends_on:
- db
- smtp
Expand Down

0 comments on commit f4e4d11

Please sign in to comment.