Skip to content

Instantly share code, notes, and snippets.

@LouisHrg
Created August 25, 2022 14:15
Show Gist options
  • Save LouisHrg/7e88c7ff331f460f95432eb3b09936ea to your computer and use it in GitHub Desktop.
Save LouisHrg/7e88c7ff331f460f95432eb3b09936ea to your computer and use it in GitHub Desktop.
Wizards Portal
version: "3.7"
services:
traefik:
image: traefik:2.2
ports:
- "80:80"
- "8080:8080"
- "443:443"
depends_on:
- dev-tls
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro
- ./traefik/dynamic-conf.toml:/etc/traefik/dynamic-conf.toml:ro
- dev-certs:/certs:ro
networks:
- wizards-portal
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=hydra
networks:
- wizards-portal
hydra-migrate:
image: oryd/hydra:v1.11.9
depends_on:
- postgres
command: migrate sql --yes ${DSN}
networks:
- wizards-portal
hydra:
image: oryd/hydra:v1.11.9
depends_on:
- postgres
ports:
- 5444:4444 # public
- 5445:4445 # admin
command: serve all
environment:
- DSN=${DSN}
- SECRETS_SYSTEM=4FWWympU61wDJNWFtY9aWAqsQx3qKZ6
- URLS_SELF_ISSUER=https://localhost:5444
- URLS_CONSENT=http://localhost:9020/consent
- URLS_LOGIN=http://localhost:9020/login
networks:
- wizards-portal
kratos-migrate:
image: oryd/kratos:v0.10.1
depends_on:
- postgres
environment:
- DSN=${DSN}
volumes:
- ./config:/etc/config/kratos
command: -c /etc/config/kratos/config.yml migrate sql -e --yes
restart: on-failure
networks:
- wizards-portal
kratos:
depends_on:
- kratos-migrate
- postgres
image: oryd/kratos:v0.10.1
ports:
- '4433:4433' # public
- '4434:4434' # admin
restart: unless-stopped
environment:
- DSN=${DSN}
- LOG_LEVEL=trace
volumes:
- ./config:/etc/config/kratos
command: serve -c /etc/config/kratos/config.yml --dev --watch-courier
networks:
- wizards-portal
kratos-selfservice-ui-node:
image: oryd/kratos-selfservice-ui-node:v0.10.1
depends_on:
- kratos
ports:
- 4455:3000
environment:
- KRATOS_PUBLIC_URL=http://kratos:4433/
- KRATOS_BROWSER_URL=http://127.0.0.1:4433/
restart: on-failure
networks:
- wizards-portal
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- '4436:4436'
- '4437:4437'
networks:
- wizards-portal
front:
image: node:16-alpine
restart: unless-stopped
working_dir: /usr/src/app
depends_on:
- kratos
command: npm run docker
ports:
- 3000:3000
- 9229:9229
- 24678:24678
volumes:
- ./front:/usr/src/app
environment:
NODE_ENV: -development
labels:
- traefik.enable=true
- traefik.http.routers.portal.rule=Host(`portal.localhost`)
- traefik.http.routers.portal.tls=true
- traefik.http.routers.portal-http.entrypoints=web
- traefik.http.routers.portal-https.entrypoints=web-secure
- traefik.http.routers.portal-http.middlewares=redirect@file
networks:
- wizards-portal
gateway:
image: node:16-alpine
restart: unless-stopped
working_dir: /usr/src/app
command: npm run start:docker
environment:
NODE_ENV: ${NODE_ENV:-development}
TZ: Europe/Paris
ports:
- 4000:4000
volumes:
- ./gateway:/usr/src/app
networks:
- wizards-portal
networks:
wizards-portal:
external: true
volumes:
dev-certs:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment