diff --git a/reactive-resume/docker-compose.yaml b/reactive-resume/docker-compose.yaml new file mode 100644 index 0000000..1e10682 --- /dev/null +++ b/reactive-resume/docker-compose.yaml @@ -0,0 +1,44 @@ +services: + postgres: + image: postgres:latest + restart: unless-stopped + environment: + - POSTGRES_DB=postgres + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + volumes: + - postgres_data:/var/lib/postgresql + networks: + - reactive_resume_network + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"] + interval: 10s + timeout: 5s + retries: 5 + + reactive_resume: + image: amruthpillai/reactive-resume:latest + restart: unless-stopped + environment: + - APP_URL=https://resume.${DOMAIN} + - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres + - AUTH_SECRET=${AUTH_SECRET} + # Add other optional env vars as needed (SMTP, S3, OAuth, etc.) + volumes: + - reactive_resume_data:/app/data + networks: + - reactive_resume_network + ports: + - 5000:3000 + depends_on: + postgres: + condition: service_healthy + 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));"] + interval: 30s + timeout: 10s + retries: 3 + +volumes: + postgres_data: + reactive_resume_data: \ No newline at end of file