55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
|
|
version: "3.9"
|
||
|
|
|
||
|
|
services:
|
||
|
|
postgres:
|
||
|
|
image: postgres:16
|
||
|
|
environment:
|
||
|
|
POSTGRES_DB: netmapper
|
||
|
|
POSTGRES_USER: netmapper
|
||
|
|
POSTGRES_PASSWORD: netmapper
|
||
|
|
volumes:
|
||
|
|
- postgres_data:/var/lib/postgresql/data
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
|
||
|
|
redis:
|
||
|
|
image: redis:7
|
||
|
|
ports:
|
||
|
|
- "6379:6379"
|
||
|
|
|
||
|
|
backend:
|
||
|
|
image: python:3.12-slim
|
||
|
|
working_dir: /app
|
||
|
|
command: sh -c "pip install -r requirements.txt && uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload"
|
||
|
|
volumes:
|
||
|
|
- ../../backend:/app
|
||
|
|
ports:
|
||
|
|
- "8000:8000"
|
||
|
|
depends_on:
|
||
|
|
- postgres
|
||
|
|
- redis
|
||
|
|
|
||
|
|
worker:
|
||
|
|
image: python:3.12-slim
|
||
|
|
working_dir: /app
|
||
|
|
command: sh -c "pip install -r requirements.txt && python app/main.py"
|
||
|
|
volumes:
|
||
|
|
- ../../worker:/app
|
||
|
|
depends_on:
|
||
|
|
- redis
|
||
|
|
- backend
|
||
|
|
|
||
|
|
frontend:
|
||
|
|
image: node:20-alpine
|
||
|
|
working_dir: /app
|
||
|
|
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 5173"
|
||
|
|
volumes:
|
||
|
|
- ../../frontend:/app
|
||
|
|
ports:
|
||
|
|
- "5173:5173"
|
||
|
|
depends_on:
|
||
|
|
- backend
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
postgres_data:
|