upodate to node.js
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
email-api:
|
||||
container_name: email-api
|
||||
image: python:3.12-slim
|
||||
image: node:18-slim
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./email_api:/app
|
||||
- /var/mail:/var/mail # Maildir-Zugriff für Health-Check
|
||||
- /var/mail:/var/mail # Maildir access for health check
|
||||
working_dir: /app
|
||||
env_file:
|
||||
- .env
|
||||
@@ -15,7 +17,33 @@ services:
|
||||
- AWS_REGION=${AWS_REGION}
|
||||
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
||||
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
||||
- SMTP_HOST=${SMTP_HOST:-localhost}
|
||||
- SMTP_PORT=${SMTP_PORT:-25}
|
||||
- MAILCOW_API_KEY=${MAILCOW_API_KEY}
|
||||
- MAILCOW_API=${MAILCOW_API}
|
||||
- PGHOST=postgres
|
||||
- PGUSER=${PGUSER:-email_user}
|
||||
- PGPASSWORD=${PGPASSWORD:-email_password}
|
||||
- PGDATABASE=${PGDATABASE:-email_db}
|
||||
- PGPORT=${PGPORT:-5432}
|
||||
command: >
|
||||
bash -c "pip install --upgrade pip &&
|
||||
pip install flask python-dotenv boto3 requests &&
|
||||
python app.py"
|
||||
bash -c "npm install express aws-sdk nodemailer emailjs-mime-parser emailjs-addressparser js-base64 winston dotenv axios pg &&
|
||||
node app.js"
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres:16
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
environment:
|
||||
- POSTGRES_USER=${PGUSER:-email_user}
|
||||
- POSTGRES_PASSWORD=${PGPASSWORD:-email_password}
|
||||
- POSTGRES_DB=${PGDATABASE:-email_db}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user