2021-06-25 07:39:31 +00:00
|
|
|
version: '3.8'
|
2021-06-01 07:55:08 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['database']
|
2021-06-01 07:55:08 +00:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
image: cockroachdb/cockroach:v21.1.0
|
|
|
|
command: start-single-node --insecure --listen-addr=0.0.0.0
|
|
|
|
ports:
|
|
|
|
- 8080:8080
|
|
|
|
- 26257:26257
|
2021-06-25 07:39:31 +00:00
|
|
|
|
|
|
|
minio:
|
|
|
|
profiles: ['backend']
|
|
|
|
image: minio/minio:RELEASE.2021-06-14T01-29-23Z
|
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
environment:
|
|
|
|
- MINIO_ACCESS_KEY=access_key
|
|
|
|
- MINIO_SECRET_KEY=secret_key
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
|
|
|
|
interval: 30s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 3
|
|
|
|
start_period: 5s
|
|
|
|
command:
|
|
|
|
- gateway
|
|
|
|
- nas
|
|
|
|
- /export
|
|
|
|
|
2021-06-01 07:55:08 +00:00
|
|
|
db-migrations:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['database']
|
2021-06-01 07:55:08 +00:00
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
image: flyway/flyway:latest
|
|
|
|
volumes:
|
|
|
|
- ../../migrations/cockroach:/flyway/sql
|
|
|
|
environment:
|
|
|
|
- FLYWAY_PLACEHOLDERS_eventstorepassword=NULL
|
|
|
|
- FLYWAY_PLACEHOLDERS_managementpassword=NULL
|
|
|
|
- FLYWAY_PLACEHOLDERS_adminapipassword=NULL
|
|
|
|
- FLYWAY_PLACEHOLDERS_authpassword=NULL
|
|
|
|
- FLYWAY_PLACEHOLDERS_notificationpassword=NULL
|
|
|
|
- FLYWAY_PLACEHOLDERS_authzpassword=NULL
|
|
|
|
- FLYWAY_PLACEHOLDERS_queriespassword=NULL
|
|
|
|
command: -url=jdbc:postgresql://db:26257/defaultdb -user=root -password= -connectRetries=5 migrate
|
2021-06-25 07:39:31 +00:00
|
|
|
|
2021-06-01 07:55:08 +00:00
|
|
|
keys:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['init-backend']
|
2021-06-01 07:55:08 +00:00
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: build/local/Dockerfile.keys
|
|
|
|
target: gen-keys
|
|
|
|
volumes:
|
|
|
|
- ../../.:/zitadel
|
|
|
|
env_file:
|
|
|
|
- ./local.env
|
|
|
|
|
|
|
|
backend-setup:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['init-backend']
|
2021-06-01 07:55:08 +00:00
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
depends_on:
|
|
|
|
- keys
|
|
|
|
build:
|
|
|
|
context: ../..
|
2021-07-27 19:55:30 +00:00
|
|
|
dockerfile: build/zitadel/Dockerfile
|
2021-06-01 07:55:08 +00:00
|
|
|
target: dev-go-build
|
|
|
|
args:
|
|
|
|
ENV: dev
|
|
|
|
volumes:
|
|
|
|
- ../../.keys:/go/src/github.com/caos/zitadel/.keys
|
|
|
|
env_file:
|
|
|
|
- ./local.env
|
2021-06-25 07:39:31 +00:00
|
|
|
environment:
|
2021-06-01 07:55:08 +00:00
|
|
|
- ZITADEL_EVENTSTORE_HOST=db
|
2021-06-25 07:39:31 +00:00
|
|
|
command:
|
|
|
|
[
|
|
|
|
'-setup-files=cmd/zitadel/setup.yaml',
|
|
|
|
'-setup-files=cmd/zitadel/system-defaults.yaml',
|
|
|
|
'-setup-files=cmd/zitadel/authz.yaml',
|
|
|
|
'setup',
|
|
|
|
]
|
|
|
|
|
2021-06-01 07:55:08 +00:00
|
|
|
backend-run:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['backend']
|
2021-06-01 07:55:08 +00:00
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
depends_on:
|
|
|
|
- db
|
2021-06-25 07:39:31 +00:00
|
|
|
- minio
|
2021-06-01 07:55:08 +00:00
|
|
|
build:
|
|
|
|
context: ../..
|
2021-07-27 12:34:56 +00:00
|
|
|
dockerfile: build/zitadel/Dockerfile
|
2021-06-01 07:55:08 +00:00
|
|
|
target: dev-go-build
|
|
|
|
args:
|
|
|
|
ENV: dev
|
|
|
|
volumes:
|
|
|
|
- ../../.keys:/go/src/github.com/caos/zitadel/.keys
|
|
|
|
env_file:
|
|
|
|
- ./local.env
|
2021-06-25 07:39:31 +00:00
|
|
|
environment:
|
2021-06-01 07:55:08 +00:00
|
|
|
- ZITADEL_EVENTSTORE_HOST=db
|
|
|
|
ports:
|
|
|
|
- 50002:50002
|
|
|
|
- 50003:50003
|
2021-06-25 07:39:31 +00:00
|
|
|
command:
|
|
|
|
[
|
|
|
|
'-console=false',
|
|
|
|
'-localDevMode=true',
|
|
|
|
'-config-files=cmd/zitadel/startup.yaml',
|
|
|
|
'-config-files=cmd/zitadel/system-defaults.yaml',
|
|
|
|
'-config-files=cmd/zitadel/authz.yaml',
|
|
|
|
'start',
|
|
|
|
]
|
2021-06-01 07:55:08 +00:00
|
|
|
|
2021-07-27 19:55:30 +00:00
|
|
|
zitadel-started-up:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['setup']
|
2021-06-01 07:55:08 +00:00
|
|
|
networks:
|
|
|
|
- zitadel
|
2021-07-27 19:55:30 +00:00
|
|
|
extra_hosts:
|
|
|
|
host.docker.internal: host-gateway
|
2021-06-01 07:55:08 +00:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: build/local/Dockerfile.started
|
|
|
|
volumes:
|
|
|
|
- ./environment.json:/environment.json
|
|
|
|
environment:
|
|
|
|
- BE_PORT=50002
|
|
|
|
- FE_PORT=4200
|
|
|
|
|
|
|
|
grpc-web-gateway:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['frontend']
|
2021-06-01 07:55:08 +00:00
|
|
|
restart: on-failure
|
|
|
|
logging:
|
|
|
|
driver: none
|
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: build/local/Dockerfile.gateway
|
|
|
|
image: grpcweb/grpcwebproxy
|
|
|
|
ports:
|
2021-06-25 07:39:31 +00:00
|
|
|
- '50000:8080'
|
2021-06-01 07:55:08 +00:00
|
|
|
environment:
|
|
|
|
- BKD_HOST=backend-run
|
|
|
|
- BKD_PORT=50001
|
2021-06-25 07:39:31 +00:00
|
|
|
|
2021-06-01 07:55:08 +00:00
|
|
|
frontend-local-run:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['frontend']
|
2021-06-01 07:55:08 +00:00
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
depends_on:
|
|
|
|
- grpc-web-gateway
|
|
|
|
build:
|
|
|
|
context: ../..
|
2021-07-27 12:34:56 +00:00
|
|
|
dockerfile: build/console/Dockerfile
|
2021-06-01 07:55:08 +00:00
|
|
|
target: dev-angular-build
|
|
|
|
args:
|
|
|
|
ENV: dev
|
|
|
|
volumes:
|
|
|
|
- ./environment.json:/console/src/assets/environment.json
|
2021-07-27 19:55:30 +00:00
|
|
|
command: sh -c "ng serve --host 0.0.0.0 --disable-host-check"
|
2021-06-01 07:55:08 +00:00
|
|
|
ports:
|
|
|
|
- 4200:4200
|
|
|
|
|
|
|
|
client-id:
|
2021-06-25 07:39:31 +00:00
|
|
|
profiles: ['init-frontend']
|
2021-06-01 07:55:08 +00:00
|
|
|
networks:
|
|
|
|
- zitadel
|
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: build/local/Dockerfile.clientid
|
|
|
|
target: client-id
|
|
|
|
volumes:
|
|
|
|
- ./environment.json:/environment.json
|
|
|
|
environment:
|
|
|
|
- HOST=backend-run
|
|
|
|
- PORT=50002
|
|
|
|
|
|
|
|
networks:
|
2021-06-25 07:39:31 +00:00
|
|
|
zitadel: {}
|