feat: add docker-compose

This commit is contained in:
2025-12-02 12:33:23 +01:00
parent a1a5fb502d
commit 0aada37286
4 changed files with 149 additions and 1 deletions

73
docker-compose.yml Normal file
View File

@@ -0,0 +1,73 @@
version: '3.8'
services:
postgresql:
image: postgres:16-alpine
container_name: meal-planner-postgres
restart: unless-stopped
environment:
POSTGRES_DB: payload-example-multi-tenant
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- meal-planner-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: meal-planner-minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "9100:9000"
- "9101:9001"
volumes:
- minio_data:/data
networks:
- meal-planner-network
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
container_name: meal-planner-app
restart: unless-stopped
environment:
DATABASE_URI: postgres://postgres:postgres@postgresql:5432/payload-example-multi-tenant
PAYLOAD_SECRET: e0d8e16cc9b401535ecf6c6f
PAYLOAD_PUBLIC_SERVER_URL: http://localhost:3100
SEED_DB: "true"
NODE_ENV: production
ports:
- "3100:3000"
depends_on:
postgresql:
condition: service_healthy
minio:
condition: service_healthy
networks:
- meal-planner-network
volumes:
postgres_data:
minio_data:
networks:
meal-planner-network:
driver: bridge