80 lines
1.9 KiB
YAML
80 lines
1.9 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_USER: mailcleaner
|
|
POSTGRES_PASSWORD: mailcleaner
|
|
POSTGRES_DB: mailcleaner
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
redis:
|
|
image: redis:7
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
api:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 8000
|
|
DATABASE_URL: postgresql://mailcleaner:mailcleaner@postgres:5432/mailcleaner
|
|
REDIS_URL: redis://redis:6379
|
|
JWT_SECRET: dev-change-me
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
|
|
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI:-http://localhost:8000/oauth/gmail/callback}
|
|
EXPORT_DIR: /tmp/mailcleaner-exports
|
|
EXPORT_TTL_HOURS: 24
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./backend:/app
|
|
|
|
worker:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
NODE_ENV: development
|
|
DATABASE_URL: postgresql://mailcleaner:mailcleaner@postgres:5432/mailcleaner
|
|
REDIS_URL: redis://redis:6379
|
|
JWT_SECRET: dev-change-me
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
|
|
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI:-http://localhost:8000/oauth/gmail/callback}
|
|
EXPORT_DIR: /tmp/mailcleaner-exports
|
|
EXPORT_TTL_HOURS: 24
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: ["npm", "run", "worker:dev"]
|
|
volumes:
|
|
- ./backend:/app
|
|
|
|
web:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
PORT: 3000
|
|
VITE_API_URL: http://localhost:8000
|
|
depends_on:
|
|
- api
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./frontend:/app
|
|
|
|
volumes:
|
|
pgdata:
|