Init
This commit is contained in:
69
docker-compose.yml
Normal file
69
docker-compose.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
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
|
||||
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
|
||||
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:
|
||||
Reference in New Issue
Block a user