我有以下docker文件
version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_caddy: {}
ghotel_cc_production_static_vol: {}
services:
django: &django
restart: always
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: ghotel_cc_api_production_django
volumes:
- production_static_vol:/app/static
depends_on:
- postgres
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start
postgres:
restart: always
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: api_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
env_file:
- ./.envs/.production/.postgres
caddy:
restart: always
build:
context: .
dockerfile: ./compose/production/caddy/Dockerfile
image: api_production_caddy
depends_on:
- django
volumes:
- production_caddy:/root/.caddy
- ghotel_cc_production_static_vol:/app/static
env_file:
- ./.envs/.production/.caddy
ports:
- "0.0.0.0:8550:80"
问题是无法发送电子邮件。没有错误,Django部分运行良好-我在控制台中看到正确的输出。但是在Django发送电子邮件之后,它就丢失了-永远不会到达收件人。
如何正确配置docker,以便可以发送电子邮件?