Switch to Cockroach DB for Kratos.

Use login.siasky.net as login server.
This commit is contained in:
Ivaylo Novakov 2020-12-08 16:15:31 +01:00
parent f08a276a7a
commit 9d42dda0a6
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
2 changed files with 23 additions and 23 deletions

View File

@ -15,6 +15,7 @@ networks:
volumes: volumes:
webapp: webapp:
kratos-sqlite:
services: services:
sia: sia:
@ -178,10 +179,10 @@ services:
kratos-migrate: kratos-migrate:
image: oryd/kratos:v0.5.4-alpha.1 image: oryd/kratos:v0.5.4-alpha.1
container_name: kratos-migrate container_name: kratos-migrate
restart: unless-stopped restart: on-failure
logging: *default-logging logging: *default-logging
environment: environment:
- DSN=mysql://root:${MYSQL_ROOT_PASSWORD}@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4 - DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
volumes: volumes:
- ./docker/kratos/config:/etc/config/kratos - ./docker/kratos/config:/etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
@ -198,7 +199,7 @@ services:
- 4433 # public - 4433 # public
- 4434 # admin - 4434 # admin
environment: environment:
- DSN=mysql://root:${MYSQL_ROOT_PASSWORD}@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4 - DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
- LOG_LEVEL=trace - LOG_LEVEL=trace
command: serve -c /etc/config/kratos/kratos.yml command: serve -c /etc/config/kratos/kratos.yml
volumes: volumes:
@ -219,21 +220,20 @@ services:
environment: environment:
- PORT=4455 - PORT=4455
- SECURITY_MODE= - SECURITY_MODE=
- BASE_URL=https://${DOMAIN_NAME}/secure/ - BASE_URL=https://login.siasky.net/secure/
- KRATOS_BROWSER_URL=https://${DOMAIN_NAME}/secure/ - KRATOS_BROWSER_URL=https://login.siasky.net/secure/
- KRATOS_PUBLIC_URL=http://kratos:4433/ - KRATOS_PUBLIC_URL=http://kratos:4433/
- KRATOS_ADMIN_URL=http://kratos:4434/ - KRATOS_ADMIN_URL=http://kratos:4434/
networks: networks:
shared: shared:
ipv4_address: 10.10.10.82 ipv4_address: 10.10.10.82
mysqld: cockroachd:
image: mysql:5.7 image: cockroachdb/cockroach:v20.1.0
container_name: mysqld container_name: cockroachd
command: start --insecure
expose: expose:
- 3306 - 26257
env_file:
- .env
networks: networks:
shared: shared:
ipv4_address: 10.10.10.90 ipv4_address: 10.10.10.90

View File

@ -4,16 +4,16 @@ dsn: memory
serve: serve:
public: public:
base_url: https://siasky.net/secure/ base_url: https://login.siasky.net/secure/
cors: cors:
enabled: true enabled: true
admin: admin:
base_url: https://siasky.net/admin/ base_url: https://login.siasky.net/admin/
selfservice: selfservice:
default_browser_return_url: https://siasky.net/secure/ default_browser_return_url: https://login.siasky.net/secure/
whitelisted_return_urls: whitelisted_return_urls:
- https://siasky.net/secure - https://login.siasky.net/secure
methods: methods:
password: password:
@ -21,33 +21,33 @@ selfservice:
flows: flows:
error: error:
ui_url: https://siasky.net/secure/error ui_url: https://login.siasky.net/secure/error
settings: settings:
ui_url: https://siasky.net/secure/settings ui_url: https://login.siasky.net/secure/settings
privileged_session_max_age: 15m privileged_session_max_age: 15m
recovery: recovery:
enabled: true enabled: true
ui_url: https://siasky.net/secure/recovery ui_url: https://login.siasky.net/secure/recovery
verification: verification:
enabled: true enabled: true
ui_url: https://siasky.net/secure/verify ui_url: https://login.siasky.net/secure/verify
after: after:
default_browser_return_url: https://siasky.net/secure/ default_browser_return_url: https://login.siasky.net/secure/
logout: logout:
after: after:
default_browser_return_url: https://siasky.net/secure/auth/login default_browser_return_url: https://login.siasky.net/secure/auth/login
login: login:
ui_url: https://siasky.net/secure/auth/login ui_url: https://login.siasky.net/secure/auth/login
lifespan: 10m lifespan: 10m
registration: registration:
lifespan: 10m lifespan: 10m
ui_url: https://siasky.net/secure/auth/registration ui_url: https://login.siasky.net/secure/auth/registration
after: after:
password: password:
hooks: hooks: