Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

Commit

Permalink
[DCK] Make sure we always use the local SMTP server
Browse files Browse the repository at this point in the history
Fixes #18 by avoiding the usage of the `smtp` hostname in environments where shared networks are used, since that is possibly repeated.
  • Loading branch information
yajo committed Jan 29, 2019
1 parent e8a0a43 commit 61e46fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ services:
PGDATABASE: prod
PGPASSWORD: "$DB_PASSWORD"
PGUSER: "$DB_USER"
SMTP_HOST: smtplocal
volumes:
- backup_cache:/root:z
- filestore:/mnt/backup/src/odoo:z
5 changes: 5 additions & 0 deletions prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
environment:
INITIAL_LANG: "$INITIAL_LANG"
PGDATABASE: &dbname prod
SMTP_SERVER: smtplocal
depends_on:
- db
- smtp
Expand Down Expand Up @@ -46,6 +47,10 @@ services:
extends:
file: common.yaml
service: smtpreal
networks:
default:
aliases:
- smtplocal
restart: unless-stopped

backup:
Expand Down
3 changes: 3 additions & 0 deletions test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
# You may want demo data for testing
WITHOUT_DEMO: "false"
SMTP_PORT: "1025"
SMTP_SERVER: smtplocal
restart: unless-stopped
depends_on:
- db
Expand Down Expand Up @@ -53,6 +54,8 @@ services:
restart: unless-stopped
networks:
default:
aliases:
- smtplocal
inverseproxy_shared:
labels:
traefik.docker.network: "inverseproxy_shared"
Expand Down

0 comments on commit 61e46fd

Please sign in to comment.