36 lines
702 B
YAML
36 lines
702 B
YAML
version: "3.9"
|
|
services:
|
|
db:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_DB: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- dbdata:/var/lib/postgresql/data
|
|
|
|
backend:
|
|
build: ./backend
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/postgres
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
frontend:
|
|
working_dir: /app
|
|
image: node:20
|
|
command: sh -c "npm i && npx nuxt dev -p 3000 -H 0.0.0.0"
|
|
volumes:
|
|
- ./frontend:/app
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
dbdata:
|