Added ory kratos to docker compose file

This commit is contained in:
2022-10-14 12:15:07 +02:00
parent ebf1dd5adc
commit b2a16e5181
5 changed files with 195 additions and 7 deletions

View File

@@ -2,9 +2,9 @@ version: '3.3'
services:
app:
build: "."
build: '.'
depends_on:
- postgres
- app-postgres
ports:
- 5000:5000
rtmp:
@@ -12,9 +12,60 @@ services:
ports:
- 1935:1935
- 8080:80
postgres:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
app-postgres:
image: postgres:9.6
ports:
- 5432:5432
- '5432:5432'
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
kratos-migrate:
image: oryd/kratos:v0.10.1
environment:
- DSN=postgres://${KRATOS_POSTGRES_USER}:${KRATOS_POSTGRES_PASSWORD}@kratos-postgres:5432/${KRATOS_POSTGRES_DB}?sslmode=disable&max_conns=20&max_idle_conns=4
volumes:
- type: bind
source: .docker/kratos
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
kratos-selfservice-ui-node:
image: oryd/kratos-selfservice-ui-node:v0.10.1
environment:
- KRATOS_PUBLIC_URL=http://kratos:4433/
- KRATOS_BROWSER_URL=http://127.0.0.1:4433/
restart: on-failure
ports:
- '4455:3000'
kratos:
depends_on:
- kratos-migrate
image: oryd/kratos:v0.10.1
ports:
- '4433:4433' # public
- '4434:4434' # admin
restart: unless-stopped
environment:
- DSN=postgres://${KRATOS_POSTGRES_USER}:${KRATOS_POSTGRES_PASSWORD}@kratos-postgres:5432/${KRATOS_POSTGRES_DB}?sslmode=disable&max_conns=20&max_idle_conns=4
- LOG_LEVEL=trace
- SECRETS_COOKIE_0=${KRATOS_COOKIE_SECRET}
- SECRETS_CIPHER_0=${KRATOS_CIPHER_SECRET}
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
volumes:
- type: bind
source: .docker/kratos
target: /etc/config/kratos
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- '4436:4436'
- '4437:4437'
kratos-postgres:
image: postgres:9.6
ports:
- '5432:5432'
environment:
- POSTGRES_USER=${KRATOS_POSTGRES_USER}
- POSTGRES_PASSWORD=${KRATOS_POSTGRES_PASSWORD}
- POSTGRES_DB=${KRATOS_POSTGRES_DB}