44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
volumes:
|
|
- ./nginx:/etc/nginx/conf.d
|
|
- ./frontend/dist:/usr/share/nginx/html
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- backend
|
|
- keycloak
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
depends_on:
|
|
- keycloak
|
|
|
|
keycloak:
|
|
image: quay.io/keycloak/keycloak:latest
|
|
environment:
|
|
- KC_DB=postgres
|
|
- KC_DB_URL=jdbc:postgresql://postgres:5432/keycloak
|
|
- KC_DB_USERNAME=${POSTGRES_USER}
|
|
- KC_DB_PASSWORD=${POSTGRES_PASSWORD}
|
|
- KEYCLOAK_ADMIN=${KEYCLOAK_USER}
|
|
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_PASSWORD}
|
|
- KEYCLOAK_FRONTEND_URL=${KEYCLOAK_FRONTEND_URL}
|
|
volumes:
|
|
- ./keycloak:/opt/keycloak/data/import
|
|
command: >
|
|
start-dev --import-realm
|
|
depends_on:
|
|
- postgres
|
|
|
|
postgres:
|
|
image: postgres:latest
|
|
environment:
|
|
POSTGRES_DB: keycloak
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- ./postgres/data:/var/lib/postgresql/data
|