65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
version: '3.8'
|
|
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: calendar_db
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:latest
|
|
command: redis-server --requirepass mySecretPassword
|
|
container_name: redis
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
minio:
|
|
image: minio/minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
volumes:
|
|
- minio_data:/data
|
|
command: server /data --console-address ":9001"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: always
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
- minio
|
|
environment:
|
|
- DATABASE_URL=postgresql://postgres:postgres@db:5432/calendar_db
|
|
- REDIS_URL=redis://:mySecretPassword@redis:6379
|
|
- MINIO_S3_UPLOAD_BUCKET_URL=http://minio:9000
|
|
- MINIO_AWS_REGION=us-east-1
|
|
- MINIO_AWS_S3_UPLOAD_BUCKET_NAME=pages
|
|
- MINIO_ACCESS_KEY=minioadmin
|
|
- MINIO_SECRET_KEY=minioadmin
|
|
|
|
volumes:
|
|
db:
|
|
driver: local
|
|
redis_data:
|
|
minio_data: |