Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions distribution/compose/docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is meant to be used for local development
services:
traefik:
container_name: traefik
image: docker.io/library/traefik:2.11
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --providers.file.directory=/etc/traefik/dynamic
ports:
- "${EXTERNAL_PORT:-80}:80"
volumes:
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock:ro
- ${PWD}/distribution/compose/traefik/dynamic:/etc/traefik/dynamic:ro
restart: unless-stopped
labels:
- org.dyrectorio.service-category=_internal
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']
ports:
- 127.0.0.1:5432:5432
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
kratos:
container_name: kratos
image: ghcr.io/dyrector-io/dyrectorio/web/kratos:${DYO_VERSION:-latest}
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}
ports:
- 4433:4433
- 4434:4434
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:-latest}
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:
29 changes: 29 additions & 0 deletions distribution/compose/traefik/dynamic/dynamic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
http:
routers:
kratos:
rule: Host(`localhost`) && PathPrefix(`/kratos`))
entrypoints: web
service: "kratos"
crux-http:
rule: "Host(`localhost`) && PathPrefix(`/api`) && !PathPrefix(`/api/auth`) && !PathPrefix(`/api/status`)"
entryPoints: ["web"]
service: "crux-api"
priority: 20
crux-ui:
rule: "Host(`localhost`)"
entryPoints: ["web"]
service: "crux-ui"
priority: 10
services:
crux-api:
loadBalancer:
servers:
- url: "http://172.17.0.1:1848"
crux-ui:
loadBalancer:
servers:
- url: "http://172.17.0.1:3000"
kratos:
loadBalancer:
servers:
- url: "http://172.17.0.1:4433"
Loading