/home/techb158/cosmic-risk.abdallabala.com
Edit: /home/techb158/cosmic-risk.abdallabala.com/docker-compose.yml (2335B)
services:
cosmic-risk:
container_name: cosmic-risk
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
# Docker internal network — app container reaches postgres/redis via service name
DATABASE_URL: postgresql://cosmic:${POSTGRES_PASSWORD:-cosmic}@postgres:5432/cosmic_saas?schema=public
REDIS_URL: redis://redis:6379
NEXT_PUBLIC_APP_URL: http://localhost:8092
# SSO — run `npm run mock-oidc` on the host before starting:
COSMIC_SSO_ENABLED: "true"
COSMIC_OIDC_ISSUER: http://host.docker.internal:8093
COSMIC_OIDC_CLIENT_ID: mock-client
COSMIC_OIDC_CLIENT_SECRET: mock-secret
COSMIC_OIDC_REDIRECT_URL: http://localhost:8092/api/auth/sso/callback
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "8094:8090"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
interval: 30s
timeout: 10s
start_period: 15s
retries: 3
postgres:
image: postgres:16-alpine
ports:
- "5433:5432"
environment:
POSTGRES_DB: cosmic_saas
POSTGRES_USER: cosmic
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-cosmic}
volumes:
- cosmic-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cosmic -d cosmic_saas"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
volumes:
- cosmic-redis-data:/data
redis-commander:
image: rediscommander/redis-commander:latest
environment:
REDIS_HOSTS: local:redis:6379
ports:
- "8082:8081"
depends_on:
- redis
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4:latest
environment:
PGADMIN_DEFAULT_EMAIL: admin@cosmic.com
PGADMIN_DEFAULT_PASSWORD: cosmic123
ports:
- "5051:80"
depends_on:
- postgres
restart: unless-stopped
volumes:
cosmic-postgres-data:
cosmic-redis-data: