122 lines
2.6 KiB
YAML
122 lines
2.6 KiB
YAML
services:
|
|
|
|
db:
|
|
restart: "no"
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
adminer:
|
|
restart: "no"
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
backend:
|
|
restart: "no"
|
|
ports:
|
|
- "8000:8000"
|
|
build:
|
|
context: .
|
|
dockerfile: backend/Dockerfile
|
|
# command: sleep infinity # Infinite loop to keep container alive doing nothing
|
|
command:
|
|
- fastapi
|
|
- run
|
|
- --reload
|
|
- "app/main.py"
|
|
develop:
|
|
watch:
|
|
- path: ./backend
|
|
action: sync
|
|
target: /app/backend
|
|
ignore:
|
|
- ./backend/.venv
|
|
- .venv
|
|
- path: ./backend/pyproject.toml
|
|
action: rebuild
|
|
# TODO: remove once coverage is done locally
|
|
volumes:
|
|
- ./backend/htmlcov:/app/backend/htmlcov
|
|
environment:
|
|
SMTP_HOST: "mailcatcher"
|
|
SMTP_PORT: "1025"
|
|
SMTP_TLS: "false"
|
|
EMAILS_FROM_EMAIL: "noreply@example.com"
|
|
|
|
mqtt-ingestor:
|
|
restart: "no"
|
|
command:
|
|
- python
|
|
- -m
|
|
- app.mqtt.ingestor
|
|
|
|
mqtt-parser-worker:
|
|
restart: "no"
|
|
command:
|
|
- python
|
|
- -m
|
|
- app.mqtt.parser_worker
|
|
|
|
mailcatcher:
|
|
image: schickling/mailcatcher
|
|
ports:
|
|
- "1080:1080"
|
|
- "1025:1025"
|
|
|
|
frontend:
|
|
restart: "no"
|
|
ports:
|
|
- "5173:80"
|
|
build:
|
|
context: .
|
|
dockerfile: frontend/Dockerfile
|
|
target: dev-stage
|
|
args:
|
|
- VITE_API_URL=http://localhost:8000
|
|
- NODE_ENV=development
|
|
environment:
|
|
- VITE_API_URL=http://localhost:8000
|
|
- CHOKIDAR_USEPOLLING=true
|
|
- CHOKIDAR_INTERVAL=150
|
|
develop:
|
|
watch:
|
|
- path: ./frontend
|
|
action: sync
|
|
target: /app/frontend
|
|
ignore:
|
|
- node_modules/
|
|
- dist/
|
|
- blob-report/
|
|
- test-results/
|
|
- package.json
|
|
- path: ./frontend/package.json
|
|
action: rebuild
|
|
- path: ./package.json
|
|
action: rebuild
|
|
- path: ./bun.lock
|
|
action: rebuild
|
|
|
|
playwright:
|
|
build:
|
|
context: .
|
|
dockerfile: frontend/Dockerfile.playwright
|
|
args:
|
|
- VITE_API_URL=http://backend:8000
|
|
- NODE_ENV=production
|
|
ipc: host
|
|
depends_on:
|
|
- backend
|
|
- mailcatcher
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- VITE_API_URL=http://backend:8000
|
|
- MAILCATCHER_HOST=http://mailcatcher:1080
|
|
# For the reports when run locally
|
|
- PLAYWRIGHT_HTML_HOST=0.0.0.0
|
|
- CI=${CI:-false}
|
|
volumes:
|
|
- ./frontend/blob-report:/app/frontend/blob-report
|
|
- ./frontend/test-results:/app/frontend/test-results
|
|
ports:
|
|
- 9323:9323
|