# This is a minimal compose file, meant to be extended using files from the distribution/compose folder # Consult the GETTING_STARTED.md services: database: container_name: database image: ghcr.io/dyrector-io/dyrectorio/multi-database:1.0.4 environment: - POSTGRES_PASSWORD=${ROOT_POSTGRES_PASSWORD} - CRUX_POSTGRES_PASSWORD=${CRUX_POSTGRES_PASSWORD} - KRATOS_POSTGRES_PASSWORD=${KRATOS_POSTGRES_PASSWORD} restart: unless-stopped volumes: ['database:/var/lib/postgresql/data'] healthcheck: # testing the healtheck with a specific database and users test: [CMD-SHELL, pg_isready -d crux -U crux_user] interval: 5s timeout: 5s retries: 5 labels: - org.dyrectorio.service-category=_internal crux: container_name: crux image: ghcr.io/dyrector-io/dyrectorio/web/crux:${DYO_VERSION:-stable} command: [serve] environment: - TZ=${TIMEZONE:-UTC} - LOG_LEVEL=${LOG_LEVEL:-debug} - DATABASE_URL=postgresql://crux_user:${CRUX_POSTGRES_PASSWORD}@database:5432/crux?schema=public - KRATOS_ADMIN_URL=http://kratos:4434 - KRATOS_URL=http://kratos:4433 - CRUX_UI_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT} - CRUX_AGENT_ADDRESS=${CRUX_AGENT_HOST}:${EXTERNAL_PORT} - JWT_SECRET=${CRUX_SECRET} - FROM_EMAIL=${FROM_EMAIL} - FROM_NAME=${FROM_NAME} - SMTP_URI=${SMTP_URI} - NODE_ENV=${NODE_ENV} - DISABLE_RECAPTCHA=${DISABLE_RECAPTCHA:-true} - RECAPTCHA_SECRET_KEY=${RECAPTCHA_SECRET_KEY} - RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY} - QA_OPT_OUT=${QA_OPT_OUT:-false} - ENCRYPTION_SECRET_KEY=${ENCRYPTION_SECRET_KEY} depends_on: database: condition: service_healthy crux-migrate: condition: service_completed_successfully restart: unless-stopped labels: - org.dyrectorio.service-category=_internal # ports: # - 1848:1848 # http API crux-migrate: container_name: crux-migrate image: ghcr.io/dyrector-io/dyrectorio/web/crux:${DYO_VERSION:-stable} command: [migrate] environment: - TZ=${TIMEZONE:-UTC} - DATABASE_URL=postgresql://crux_user:${CRUX_POSTGRES_PASSWORD}@database:5432/crux?schema=public&connect_timeout=5 depends_on: database: condition: service_healthy restart: 'no' labels: - org.dyrectorio.service-category=_internal crux-ui: container_name: crux-ui image: ghcr.io/dyrector-io/dyrectorio/web/crux-ui:${DYO_VERSION:-stable} environment: - TZ=${TIMEZONE:-UTC} - CRUX_UI_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT} - KRATOS_URL=http://kratos:4433 - KRATOS_ADMIN_URL=http://kratos:4434 - CRUX_URL=http://crux:1848 - DISABLE_RECAPTCHA=${DISABLE_RECAPTCHA:-true} - RECAPTCHA_SECRET_KEY=${RECAPTCHA_SECRET_KEY} - RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY} depends_on: crux: condition: service_started restart: unless-stopped labels: - org.dyrectorio.service-category=_internal kratos: container_name: kratos image: ghcr.io/dyrector-io/dyrectorio/web/kratos:${DYO_VERSION:-stable} environment: - SQA_OPT_OUT=true - DSN=postgres://kratos_user:${KRATOS_POSTGRES_PASSWORD}@database:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4&connect_timeout=5 - KRATOS_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT}/kratos - KRATOS_ADMIN_URL=http://kratos:4434 - AUTH_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT}/auth - CRUX_UI_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT} - LOG_LEVEL=info - LOG_LEAK_SENSITIVE_VALUES=false - SECRETS_COOKIE=${KRATOS_SECRET} - COURIER_SMTP_CONNECTION_URI=${SMTP_URI} - FROM_EMAIL=${FROM_EMAIL} - FROM_NAME=${FROM_NAME} depends_on: database: condition: service_healthy kratos-migrate: condition: service_completed_successfully restart: unless-stopped labels: - org.dyrectorio.service-category=_internal kratos-migrate: container_name: kratos-migrate image: ghcr.io/dyrector-io/dyrectorio/web/kratos:${DYO_VERSION:-stable} command: -c /etc/config/kratos/kratos.yaml migrate sql -e --yes environment: - SQA_OPT_OUT=true - DSN=postgres://kratos_user:${KRATOS_POSTGRES_PASSWORD}@database:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4 depends_on: database: condition: service_healthy restart: 'no' labels: - org.dyrectorio.service-category=_internal volumes: database: