mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-08-05 14:10:58 -04:00
67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
---
|
|
# docker compose file for development environment
|
|
|
|
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
|
|
- ./.env:/app/.env
|
|
- ./backend/alembic.ini:/app/alembic.ini
|
|
- ./backend/migrations:/app/migrations
|
|
environment:
|
|
ENVIRONMENT: development
|
|
BACKEND_LOG_LEVEL: DEBUG
|
|
ports:
|
|
- "${BACKEND_PORT}:${BACKEND_PORT}"
|
|
command:
|
|
[
|
|
"sh",
|
|
"-c",
|
|
"alembic upgrade head && uvicorn backend.main:app --host 0.0.0.0 --port ${BACKEND_PORT} --reload",
|
|
]
|
|
restart: always
|
|
|
|
frontend:
|
|
image: node:24.6.0
|
|
working_dir: /app
|
|
environment:
|
|
REACT_APP_FRONTEND_LOG_LEVEL: debug
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
- ./.env:/app/.env
|
|
ports:
|
|
- "${FRONTEND_PORT}:3000"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- app-network
|
|
command: >
|
|
sh -c "
|
|
corepack enable &&
|
|
corepack prepare yarn@4.10.3 --activate &&
|
|
yarn install --frozen-lockfile &&
|
|
yarn start
|
|
"
|
|
restart: always
|
|
|
|
postgres:
|
|
extends:
|
|
file: compose.yml
|
|
service: postgres
|
|
ports:
|
|
- "${DATABASE_PORT}:${DATABASE_PORT}"
|
|
restart: always
|
|
|
|
volumes:
|
|
postgres-data:
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|