Files
Reactive-Resume/compose.yml
T

102 lines
2.5 KiB
YAML

name: reactive_resume
services:
postgres:
image: postgres:latest
restart: unless-stopped
networks:
- data_network
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
seaweedfs:
image: chrislusf/seaweedfs:latest
restart: unless-stopped
command: server -s3 -filer -dir=/data -ip=0.0.0.0
networks:
- storage_network
environment:
- AWS_ACCESS_KEY_ID=seaweedfs
- AWS_SECRET_ACCESS_KEY=seaweedfs
ports:
- "8333:8333"
volumes:
- seaweedfs_data:/data
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:8888"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
seaweedfs_create_bucket:
image: quay.io/minio/mc:latest
restart: on-failure
entrypoint: >
/bin/sh -c "
sleep 5;
mc alias set seaweedfs http://seaweedfs:8333 seaweedfs seaweedfs;
mc mb seaweedfs/reactive-resume;
exit 0;
"
networks:
- storage_network
depends_on:
seaweedfs:
condition: service_healthy
reactive_resume:
image: ghcr.io/amruthpillai/reactive-resume:latest
# build:
# context: .
# dockerfile: Dockerfile
networks:
- data_network
- storage_network
ports:
- "3000:3000"
environment:
- APP_URL=http://localhost:3000
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/postgres
- AUTH_SECRET=change-me-to-a-secure-secret-key-in-production
- S3_ACCESS_KEY_ID=seaweedfs
- S3_SECRET_ACCESS_KEY=seaweedfs
- S3_ENDPOINT=http://seaweedfs:8333
- S3_BUCKET=reactive-resume
- S3_FORCE_PATH_STYLE=true
volumes:
- ./data:/app/data
depends_on:
postgres:
condition: service_healthy
seaweedfs:
condition: service_healthy
seaweedfs_create_bucket:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/api/health').then((r) => { if (!r.ok) process.exit(1); }).catch(() => process.exit(1));"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
seaweedfs_data:
networks:
data_network:
storage_network: