2025SELab2-project-Dwengo/compose.yml

52 lines
1.6 KiB
YAML

#
# Use this configuration during development.
#
# This configuration is suitable to access the services using their ports.
#
services:
db:
image: postgres:latest
ports:
- '5432:5432'
restart: unless-stopped
volumes:
- dwengo_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
idp: # Based on: https://medium.com/@fingervinicius/easy-running-keycloak-with-docker-compose-b0d7a4ee2358
image: quay.io/keycloak/keycloak:latest
ports:
- '7080:7080'
# - '7443:7443'
command: [ 'start-dev', '--http-port', '7080', '--https-port', '7443', '--import-realm' ]
restart: unless-stopped
volumes:
- ./config/idp:/opt/keycloak/data/import
depends_on:
- db
environment:
KC_HOSTNAME: localhost
KC_HOSTNAME_PORT: 7080
KC_HOSTNAME_STRICT_BACKCHANNEL: 'true'
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_HEALTH_ENABLED: 'true'
KC_LOG_LEVEL: info
logging:
image: grafana/loki:latest
ports:
- '9001:3102'
- '9095:9095'
command: -config.file=/etc/loki/config.yaml
restart: unless-stopped
volumes:
- ./config/loki/config.yml:/etc/loki/config.yaml
- dwengo_loki_data:/loki
volumes:
dwengo_loki_data:
dwengo_postgres_data: