DockerProduction/cosmos/reactive-resume/docker-compose.yml

113 lines
3.3 KiB
YAML
Raw Normal View History

2024-10-10 17:56:23 +00:00
# In this Docker Compose example, it assumes that you maintain a reverse proxy externally (or chose not to).
# The only two exposed ports here are from minio (:9000) and the app itself (:3000).
# If these ports are changed, ensure that the env vars passed to the app are also changed accordingly.
services:
# Database (Postgres)
2024-10-10 18:14:06 +00:00
reactiveresume-postgres:
2024-10-10 17:56:23 +00:00
image: postgres:16-alpine
restart: unless-stopped
2024-10-10 18:14:06 +00:00
container_name: reactiveresume-postgres
2024-10-10 17:56:23 +00:00
volumes:
2024-10-10 18:14:06 +00:00
- reactiveresume-postgres_data:/var/lib/postgresql/data
2024-10-10 17:56:23 +00:00
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
timeout: 5s
retries: 5
# Storage (for image uploads)
2024-10-10 18:14:06 +00:00
reactiveresume-minio:
2024-10-10 17:56:23 +00:00
image: minio/minio
restart: unless-stopped
2024-10-10 18:14:06 +00:00
container_name: reactiveresume-minio
2024-10-10 17:56:23 +00:00
command: server /data
ports:
2024-10-10 18:14:06 +00:00
- "1000:9000"
2024-10-10 17:56:23 +00:00
volumes:
2024-10-10 18:14:06 +00:00
- reactiveresume-minio_data:/data
2024-10-10 17:56:23 +00:00
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
# Chrome Browser (for printing and previews)
2024-10-10 18:14:06 +00:00
reactiveresume-chrome:
2024-10-10 17:56:23 +00:00
image: ghcr.io/browserless/chromium:latest
restart: unless-stopped
2024-10-10 18:14:06 +00:00
container_name: reactiveresume-chrome
2024-10-10 17:56:23 +00:00
environment:
TIMEOUT: 10000
CONCURRENT: 10
TOKEN: chrome_token
EXIT_ON_HEALTH_FAILURE: true
PRE_REQUEST_HEALTH_CHECK: true
2024-10-10 18:14:06 +00:00
reactiveresume-app:
2024-10-10 17:56:23 +00:00
image: amruthpillai/reactive-resume:latest
restart: unless-stopped
2024-10-10 18:14:06 +00:00
container_name: reactiveresume-app
2024-10-10 17:56:23 +00:00
ports:
2024-10-10 18:14:06 +00:00
- "1001:3000"
2024-10-10 17:56:23 +00:00
depends_on:
2024-10-10 18:14:06 +00:00
- reactiveresume-postgres
- reactiveresume-minio
- reactiveresume-chrome
2024-10-10 17:56:23 +00:00
environment:
# -- Environment Variables --
2024-10-10 18:14:06 +00:00
PORT: 1001
2024-10-10 17:56:23 +00:00
NODE_ENV: production
# -- URLs --
2024-10-10 18:14:06 +00:00
PUBLIC_URL: http://localhost:1001
STORAGE_URL: http://localhost:1000/default
2024-10-10 17:56:23 +00:00
# -- Printer (Chrome) --
CHROME_TOKEN: chrome_token
2024-10-10 18:14:06 +00:00
CHROME_URL: ws://reactiveresume-chrome:1001
2024-10-10 17:56:23 +00:00
# -- Database (Postgres) --
2024-10-10 18:14:06 +00:00
DATABASE_URL: postgresql://postgres:postgres@reactiveresume-postgres:5432/postgres
2024-10-10 17:56:23 +00:00
# -- Auth --
ACCESS_TOKEN_SECRET: access_token_secret
REFRESH_TOKEN_SECRET: refresh_token_secret
# -- Emails --
MAIL_FROM: noreply@localhost
# SMTP_URL: smtp://user:pass@smtp:587 # Optional
# -- Storage (Minio) --
2024-10-10 18:14:06 +00:00
STORAGE_ENDPOINT: reactiveresume-minio
STORAGE_PORT: 1000
2024-10-10 17:56:23 +00:00
STORAGE_REGION: us-east-1 # Optional
STORAGE_BUCKET: default
STORAGE_ACCESS_KEY: minioadmin
STORAGE_SECRET_KEY: minioadmin
STORAGE_USE_SSL: false
STORAGE_SKIP_BUCKET_CHECK: false
# -- Crowdin (Optional) --
# CROWDIN_PROJECT_ID:
# CROWDIN_PERSONAL_TOKEN:
# -- Email (Optional) --
# DISABLE_SIGNUPS: false
# DISABLE_EMAIL_AUTH: false
# -- GitHub (Optional) --
# GITHUB_CLIENT_ID: github_client_id
# GITHUB_CLIENT_SECRET: github_client_secret
# GITHUB_CALLBACK_URL: http://localhost:3000/api/auth/github/callback
# -- Google (Optional) --
# GOOGLE_CLIENT_ID: google_client_id
# GOOGLE_CLIENT_SECRET: google_client_secret
# GOOGLE_CALLBACK_URL: http://localhost:3000/api/auth/google/callback
volumes:
2024-10-10 18:14:06 +00:00
reactiveresume-minio_data:
reactiveresume-postgres_data: