rybbit/docker-compose.yml
2025-03-11 21:46:24 -07:00

81 lines
1.9 KiB
YAML

version: '3.8'
services:
clickhouse:
container_name: clickhouse
image: clickhouse/clickhouse-server:latest
ports:
- "8123:8123"
- "9000:9000"
volumes:
- clickhouse-data:/var/lib/clickhouse
environment:
- CLICKHOUSE_DB=analytics
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=frog
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
interval: 3s
timeout: 5s
retries: 5
start_period: 10s
postgres:
image: postgres:latest
container_name: postgres
environment:
POSTGRES_USER: frog
POSTGRES_PASSWORD: frog
POSTGRES_DB: analytics
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
backend:
container_name: backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- CLICKHOUSE_HOST=http://clickhouse:8123
- CLICKHOUSE_DB=analytics
- CLICKHOUSE_PASSWORD=frog
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=analytics
- POSTGRES_USER=frog
- POSTGRES_PASSWORD=frog
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
- BASE_URL=${BASE_URL}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
- CLOUD=${CLOUD}
depends_on:
clickhouse:
condition: service_healthy
postgres:
condition: service_started
client:
container_name: client
build:
context: ./client
dockerfile: Dockerfile
args:
NEXT_PUBLIC_BACKEND_URL: ${BASE_URL}
ports:
- "3002:3002"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_BACKEND_URL=${BASE_URL}
- CLOUD=${CLOUD}
depends_on:
- backend
volumes:
clickhouse-data:
postgres-data: