feat(docker): add production docker-compose configuration
This commit is contained in:
parent
9289a72acf
commit
19e2b4d64d
1 changed files with 59 additions and 0 deletions
59
docker/docker-compose.prod.yml
Normal file
59
docker/docker-compose.prod.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
volumes:
|
||||
keycloak_data:
|
||||
postgres_data_keycloak_db:
|
||||
postgres_data:
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ../backend/
|
||||
dockerfile: .docker/Dockerfile
|
||||
environment:
|
||||
- DB_HOST=postgres_db
|
||||
depends_on:
|
||||
- postgres_db
|
||||
|
||||
keycloak_lf12:
|
||||
image: quay.io/keycloak/keycloak:23.0
|
||||
volumes:
|
||||
- keycloak_data:/opt/keycloak/data
|
||||
- ./imports:/opt/keycloak/data/import
|
||||
command:
|
||||
- start-dev
|
||||
- --import-realm
|
||||
environment:
|
||||
KC_DB: postgres
|
||||
KC_DB_URL_HOST: keycloakdb_svr
|
||||
KC_DB_URL_DATABASE: keycloakdb
|
||||
KC_DB_PASSWORD: postgres_pass
|
||||
KC_DB_USERNAME: postgres_user
|
||||
KC_DB_SCHEMA: public
|
||||
KEYCLOAK_ADMIN: admin
|
||||
KEYCLOAK_ADMIN_PASSWORD: admin
|
||||
ports:
|
||||
- "9090:8080"
|
||||
depends_on:
|
||||
keycloakdb_svr:
|
||||
condition: service_healthy
|
||||
|
||||
keycloakdb_svr:
|
||||
image: postgres:14.2
|
||||
volumes:
|
||||
- postgres_data_keycloak_db:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: keycloakdb
|
||||
POSTGRES_USER: postgres_user
|
||||
POSTGRES_PASSWORD: postgres_pass
|
||||
healthcheck:
|
||||
test: "exit 0"
|
||||
|
||||
postgres_db:
|
||||
image: postgres:16.4
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: postgresdb
|
||||
POSTGRES_USER: postgres_user
|
||||
POSTGRES_PASSWORD: postgres_pass
|
||||
healthcheck:
|
||||
test: "exit 0"
|
Reference in a new issue