100 lines
2.6 KiB
YAML
100 lines
2.6 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: coop-postgres
|
|
environment:
|
|
POSTGRES_USER: coop
|
|
POSTGRES_PASSWORD: coop_password
|
|
POSTGRES_DB: coop_credits
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U coop -d coop_credits"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- coop-network
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: coop-redis
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- coop-network
|
|
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: backend/Dockerfile
|
|
container_name: coop-backend
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3002/health || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=postgresql://coop:coop_password@localhost:5432/coop_credits?schema=public
|
|
- REDIS_URL=redis://localhost:6379
|
|
- PORT=3002
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
- SOLANA_RPC_URL=${SOLANA_RPC_URL:-https://api.devnet.solana.com}
|
|
- SOLANA_PROGRAM_ID=${SOLANA_PROGRAM_ID}
|
|
- SOLANA_MINT_AUTHORITY_KEYPAIR=${SOLANA_MINT_AUTHORITY_KEYPAIR}
|
|
- PLEX_CLIENT_ID=${PLEX_CLIENT_ID}
|
|
- PLEX_CLIENT_SECRET=${PLEX_CLIENT_SECRET}
|
|
- PLEX_REDIRECT_URI=${PLEX_REDIRECT_URI}
|
|
- TAUTULLI_URL=${TAUTULLI_URL}
|
|
- TAUTULLI_API_KEY=${TAUTULLI_API_KEY}
|
|
- OVERSEER_URL=${OVERSEER_URL}
|
|
- OVERSEER_API_KEY=${OVERSEER_API_KEY}
|
|
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
|
- KOFI_VERIFICATION_TOKEN=${KOFI_VERIFICATION_TOKEN}
|
|
- PLIVO_AUTH_ID=${PLIVO_AUTH_ID}
|
|
- PLIVO_AUTH_TOKEN=${PLIVO_AUTH_TOKEN}
|
|
- PLIVO_SRC_NUMBER=${PLIVO_SRC_NUMBER}
|
|
network_mode: host
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: frontend/Dockerfile
|
|
args:
|
|
- NEXT_PUBLIC_API_URL=${API_URL:-http://localhost:3002}
|
|
container_name: coop-frontend
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_PUBLIC_API_URL=${API_URL:-http://localhost:3002}
|
|
ports:
|
|
- "3000:3000" # Exposed on all interfaces
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- coop-network
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
coop-network:
|
|
driver: bridge
|