42 lines
814 B
YAML
42 lines
814 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
build: ./backend
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./backend:/app
|
|
environment:
|
|
- DATABASE_URL=postgresql://user:password@db:5432/elmeg_db
|
|
depends_on:
|
|
- db
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL=http://localhost:8000
|
|
- INTERNAL_API_URL=http://backend:8000
|
|
depends_on:
|
|
- backend
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=elmeg_db
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
postgres_data:
|