This commit is contained in:
parent
d84a5a69b0
commit
9a3e279212
|
|
@ -1,10 +1,11 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
email-api:
|
email-api:
|
||||||
container_name: email-api
|
container_name: email-api
|
||||||
image: node:22-slim
|
image: node:22-slim
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
network_mode: host
|
||||||
- "5000:5000" # Map REST API port
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./email_api:/app
|
- ./email_api:/app
|
||||||
- /var/mail:/var/mail # Maildir access for health check
|
- /var/mail:/var/mail # Maildir access for health check
|
||||||
|
|
@ -16,7 +17,7 @@ services:
|
||||||
- AWS_REGION=${AWS_REGION}
|
- AWS_REGION=${AWS_REGION}
|
||||||
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
||||||
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
||||||
- SMTP_HOST=${SMTP_HOST:-smtp} # Reference SMTP service or external host
|
- SMTP_HOST=${SMTP_HOST:-localhost}
|
||||||
- SMTP_PORT=${SMTP_PORT:-25}
|
- SMTP_PORT=${SMTP_PORT:-25}
|
||||||
- MAILCOW_API_KEY=${MAILCOW_API_KEY}
|
- MAILCOW_API_KEY=${MAILCOW_API_KEY}
|
||||||
- MAILCOW_API=${MAILCOW_API}
|
- MAILCOW_API=${MAILCOW_API}
|
||||||
|
|
@ -24,20 +25,17 @@ services:
|
||||||
- PGUSER=${PGUSER:-email_user}
|
- PGUSER=${PGUSER:-email_user}
|
||||||
- PGPASSWORD=${PGPASSWORD:-email_password}
|
- PGPASSWORD=${PGPASSWORD:-email_password}
|
||||||
- PGDATABASE=${PGDATABASE:-email_db}
|
- PGDATABASE=${PGDATABASE:-email_db}
|
||||||
- PGPORT=${PGPORT:-5432}
|
- PGPORT=${PGPORT:-5433}
|
||||||
command: >
|
command: >
|
||||||
bash -c "npm install && node app.js"
|
bash -c "npm install && node app.js"
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
|
||||||
- email-network
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
container_name: email-api-postgres
|
container_name: email-api-postgres
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
network_mode: host
|
||||||
- "5433:5432" # Map container port 5432 to host port 5433
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=${PGUSER:-email_user}
|
- POSTGRES_USER=${PGUSER:-email_user}
|
||||||
- POSTGRES_PASSWORD=${PGPASSWORD:-email_password}
|
- POSTGRES_PASSWORD=${PGPASSWORD:-email_password}
|
||||||
|
|
@ -45,12 +43,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- email_postgres_data:/var/lib/postgresql/data
|
- email_postgres_data:/var/lib/postgresql/data
|
||||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
networks:
|
command: >
|
||||||
- email-network
|
postgres -c port=${PGPORT:-5433}
|
||||||
|
|
||||||
networks:
|
|
||||||
email-network:
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
email_postgres_data:
|
email_postgres_data:
|
||||||
Loading…
Reference in New Issue