Add initial project structure with Docker setup and frontend/backend files
This commit is contained in:
41
docker-compose.yaml
Executable file
41
docker-compose.yaml
Executable file
@@ -0,0 +1,41 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:13
|
||||
environment:
|
||||
- POSTGRES_DB=workout_buddy
|
||||
- POSTGRES_USER=workout_user
|
||||
- POSTGRES_PASSWORD=workout_password
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
- ./db/:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U workout_user -d workout_buddy"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build: ./backend
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://workout_user:workout_password@db/workout_buddy
|
||||
- JWT_SECRET_KEY=super-secret
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
build: ./frontend
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- SECRET_KEY=super-secret
|
||||
- API_URL=http://backend:5000
|
||||
depends_on:
|
||||
- backend
|
||||
#
|
||||
volumes:
|
||||
db-data:
|
||||
Reference in New Issue
Block a user