mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-06 02:08:26 -04:00
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
|
|
services:
|
||
|
|
backend:
|
||
|
|
extends:
|
||
|
|
file: compose.yml
|
||
|
|
service: backend
|
||
|
|
volumes:
|
||
|
|
- ./backend/src:/app/src
|
||
|
|
- ./backend/poetry.lock:/app/poetry.lock
|
||
|
|
- ./backend/pyproject.toml:/app/pyproject.toml
|
||
|
|
command: ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||
|
|
restart: always
|
||
|
|
logging:
|
||
|
|
driver: "json-file"
|
||
|
|
options:
|
||
|
|
max-size: "10m"
|
||
|
|
max-file: "3"
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
security_opt:
|
||
|
|
- no-new-privileges:true
|
||
|
|
user: "1000:1000" # Non-root user
|
||
|
|
|
||
|
|
frontend:
|
||
|
|
extends:
|
||
|
|
file: compose.yml
|
||
|
|
service: frontend
|
||
|
|
volumes:
|
||
|
|
- ./frontend/src:/app/src
|
||
|
|
- ./frontend/package.json:/app/package.json
|
||
|
|
- ./frontend/yarn.lock:/app/yarn.lock
|
||
|
|
command: ["yarn", "start"]
|
||
|
|
restart: always
|
||
|
|
logging:
|
||
|
|
driver: "json-file"
|
||
|
|
options:
|
||
|
|
max-size: "10m"
|
||
|
|
max-file: "3"
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
security_opt:
|
||
|
|
- no-new-privileges:true
|
||
|
|
user: "1000:1000" # Non-root user
|
||
|
|
|
||
|
|
postgres:
|
||
|
|
extends:
|
||
|
|
file: compose.yml
|
||
|
|
service: postgres
|
||
|
|
restart: always
|
||
|
|
logging:
|
||
|
|
driver: "json-file"
|
||
|
|
options:
|
||
|
|
max-size: "10m"
|
||
|
|
max-file: "3"
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
postgres-data:
|
||
|
|
|
||
|
|
networks:
|
||
|
|
app-network:
|
||
|
|
driver: bridge
|