Reservation de salle
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Base de données PostgreSQL
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: dockezr_db
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: user
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: dockezr
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- dockezr_network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U user -d dockezr"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Backend FastAPI
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: dockezr_backend
|
||||
restart: always
|
||||
environment:
|
||||
DATABASE_URL: postgresql://user:password@db:5432/dockezr
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- dockezr_network
|
||||
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
|
||||
|
||||
# Frontend Next.js
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: dockezr_frontend
|
||||
restart: always
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: http://localhost:8000
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
- /app/.next
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- dockezr_network
|
||||
|
||||
networks:
|
||||
dockezr_network:
|
||||
driver: bridge
|
||||
name: dockezr_network
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
name: dockezr_postgres_data
|
||||
|
||||
Reference in New Issue
Block a user