You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
176 lines
5.6 KiB
YAML
176 lines
5.6 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
# Infrastructure services
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:${DC_CLICKHOUSE_VERSION:-23}
|
|
environment:
|
|
CLICKHOUSE_DB: ${CLICKHOUSE_DATABASE:-cosmo}
|
|
CLICKHOUSE_USER: ${CLICKHOUSE_USER:-default}
|
|
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-changeme}
|
|
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: ${CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT:-1}
|
|
ports:
|
|
- "8123:8123"
|
|
- "9000:9000"
|
|
- "9440:9440"
|
|
volumes:
|
|
- clickhouse:/var/lib/clickhouse
|
|
- ./docker/clickhouse/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
|
|
|
|
postgres:
|
|
image: postgres:${DC_POSTGRESQL_VERSION:-15.3}
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
POSTGRES_DB: ${POSTGRES_DB:-controlplane}
|
|
PGDATA: /data/postgres
|
|
volumes:
|
|
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
- postgres:/data/postgres
|
|
# ports:
|
|
# - "5432:5432"
|
|
restart: unless-stopped
|
|
|
|
keycloak:
|
|
image: ghcr.io/wundergraph/cosmo/keycloak:${DC_KEYCLOAK_VERSION:-latest}
|
|
platform: linux/amd64
|
|
environment:
|
|
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN:-admin}
|
|
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-changeme}
|
|
KC_DB: postgres
|
|
KC_DB_URL_HOST: postgres
|
|
KC_DB_URL_DATABASE: ${POSTGRES_DB:-keycloak}
|
|
KC_DB_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
KC_DB_USERNAME: ${POSTGRES_USER:-postgres}
|
|
KC_DB_SCHEMA: public
|
|
command:
|
|
- "start-dev"
|
|
- "--import-realm"
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./docker/keycloak/realm.json:/opt/keycloak/data/import/realm.json:ro
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- postgres
|
|
|
|
# Cosmo Platform
|
|
otelcollector:
|
|
# On the public repo
|
|
image: ghcr.io/wundergraph/cosmo/otelcollector:${DC_OTELCOLLECTOR_VERSION:-latest}
|
|
platform: linux/amd64
|
|
environment:
|
|
CLICKHOUSE_ENDPOINT: "clickhouse://${CLICKHOUSE_USER:-default}:${CLICKHOUSE_PASSWORD:-changeme}@clickhouse:9000/${CLICKHOUSE_DATABASE:-cosmo}?dial_timeout=15s&compress=lz4"
|
|
OTEL_INGEST_JWT_SECRET: ${OTEL_INGEST_JWT_SECRET:-fkczyomvdprgvtmvkuhvprxuggkbgwld}
|
|
PROMETHEUS_REMOTE_ENDPOINT: "http://prometheus:9090/api/v1/write"
|
|
PROMETHEUS_USERNAME: ${PROMETHEUS_USERNAME:-admin}
|
|
PROMETHEUS_PASSWORD: ${PROMETHEUS_PASSWORD:-test}
|
|
ports:
|
|
- "4318:4318"
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- clickhouse
|
|
|
|
controlplane:
|
|
image: ghcr.io/wundergraph/cosmo/controlplane:${DC_CONTROLPLANE_VERSION:-latest}
|
|
platform: linux/amd64
|
|
environment:
|
|
DB_URL: "postgresql://postgres:changeme@postgres:5432/controlplane"
|
|
PORT: 3001
|
|
HOST: "0.0.0.0"
|
|
ALLOWED_ORIGINS: "http://localhost:3000"
|
|
LOG_LEVEL: "info"
|
|
DEBUG_SQL: "true"
|
|
CLICKHOUSE_DSN: "http://default:changeme@clickhouse:8123?database=cosmo"
|
|
AUTH_REDIRECT_URI: "http://localhost:3001/v1/auth/callback"
|
|
WEB_BASE_URL: "http://localhost:3000"
|
|
AUTH_JWT_SECRET: "fkczyomvdprgvtmvkuhvprxuggkbgwld"
|
|
KC_CLIENT_ID: "studio"
|
|
KC_REALM: "cosmo"
|
|
KC_ADMIN_USER: ${KEYCLOAK_ADMIN:-admin}
|
|
KC_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-changeme}
|
|
KC_API_URL: "http://keycloak:8080"
|
|
KC_FRONTEND_URL: "http://localhost:8080"
|
|
PROMETHEUS_API_URL: "http://admin:test@prometheus:9090/api/v1"
|
|
ports:
|
|
- "3001:3001"
|
|
restart: on-failure
|
|
depends_on:
|
|
- postgres
|
|
- clickhouse
|
|
|
|
router:
|
|
image: ghcr.io/wundergraph/cosmo/router:${DC_ROUTER_VERSION:-latest}
|
|
platform: linux/amd64
|
|
environment:
|
|
LOG_LEVEL: info
|
|
FEDERATED_GRAPH_NAME: production
|
|
CORS_ALLOW_CREDENTIALS: true
|
|
LISTEN_ADDR: "0.0.0.0:3002"
|
|
CONTROLPLANE_URL: http://controlplane:3001
|
|
DEFAULT_TELEMETRY_ENDPOINT: http://otelcollector:4318
|
|
GRAPH_API_TOKEN: ${ROUTER_TOKEN}
|
|
restart: on-failure
|
|
ports:
|
|
- "3002:3002"
|
|
|
|
studio:
|
|
image: ghcr.io/wundergraph/cosmo/studio:${DC_STUDIO_VERSION:-latest}
|
|
platform: linux/amd64
|
|
environment:
|
|
NEXT_PUBLIC_COSMO_CP_URL: http://localhost:3001
|
|
HOSTNAME: "0.0.0.0"
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
# Migrations & Seed
|
|
seed:
|
|
image: ghcr.io/wundergraph/cosmo/controlplane:${DC_CONTROLPLANE_VERSION:-latest}
|
|
platform: linux/amd64
|
|
command:
|
|
- "/app/dist/bin/seed.js"
|
|
environment:
|
|
KC_REALM: "cosmo"
|
|
KC_API_URL: "http://keycloak:8080"
|
|
KC_ADMIN_USER: "admin"
|
|
KC_ADMIN_PASSWORD: "changeme"
|
|
KC_CLIENT_ID: "studio"
|
|
API_KEY: cosmo_669b576aaadc10ee1ae81d9193425705
|
|
DB_URL: "postgresql://postgres:changeme@postgres:5432/controlplane"
|
|
USER_EMAIL: foo@wundergraph.com
|
|
USER_PASSWORD: bar
|
|
USER_FIRSTNAME: foo
|
|
USER_LASTNAME: bar
|
|
ORGANIZATION_NAME: wundergraph
|
|
ORGANIZATION_SLUG: wundergraph
|
|
restart: on-failure
|
|
depends_on:
|
|
- postgres
|
|
- clickhouse
|
|
- keycloak
|
|
|
|
clickhouse-migration:
|
|
image: ghcr.io/wundergraph/cosmo/controlplane:${DC_CONTROLPLANE_VERSION:-latest}
|
|
platform: linux/amd64
|
|
command: node dist/bin/ch-migrate.js
|
|
depends_on:
|
|
- clickhouse
|
|
environment:
|
|
- CLICKHOUSE_DSN=clickhouse://default:changeme@clickhouse:9000/cosmo
|
|
restart: on-failure
|
|
|
|
database-migration:
|
|
image: ghcr.io/wundergraph/cosmo/controlplane:${DC_CONTROLPLANE_VERSION:-latest}
|
|
platform: linux/amd64
|
|
command: node dist/bin/db-migrate.js
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
- DB_URL=postgresql://postgres:changeme@postgres:5432/controlplane
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
postgres:
|
|
clickhouse:
|
|
prometheus:
|