fix: docker compose up voor development

Spint enkel de nodige containers op voor development.
Anders gebruik -f compose.stating.yml of compose.production.yml
This commit is contained in:
Tibo De Peuter 2025-03-21 10:00:49 +01:00
parent 06b5a93cef
commit 7a657c9b86
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
3 changed files with 42 additions and 19 deletions

View file

@ -1,7 +1,8 @@
# #
# This file is used to define the production environment for the project. # Use this configuration to deploy the project on a server.
# It is used to deploy the project on a server. #
# Should not be used for local development. # This configuration builds the frontend and backend services as Docker images,
# and uses the paths for the services, instead of ports, and enables SSL.
# #
services: services:
web: web:
@ -35,12 +36,16 @@ services:
- 'traefik.http.services.api.loadbalancer.server.port=3000' - 'traefik.http.services.api.loadbalancer.server.port=3000'
db: db:
# Also see compose.yml extends:
file: ./compose.yml
service: db
networks: networks:
- dwengo-1 - dwengo-1
idp: idp:
# Also see compose.yml extends:
file: ./compose.yml
service: idp
# TODO Replace with proper production command # TODO Replace with proper production command
command: ['start-dev', '--http-port', '7080', '--https-port', '7443', '--import-realm'] command: ['start-dev', '--http-port', '7080', '--https-port', '7443', '--import-realm']
networks: networks:
@ -92,7 +97,15 @@ services:
- dwengo-1 - dwengo-1
logging: logging:
# Also see compose.yml 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
networks: networks:
- dwengo-1 - dwengo-1
@ -107,6 +120,7 @@ services:
volumes: volumes:
dwengo_grafana_data: dwengo_grafana_data:
dwengo_letsencrypt: dwengo_letsencrypt:
dwengo_loki_data:
networks: networks:
dwengo-1: dwengo-1:

View file

@ -32,8 +32,15 @@ services:
- 'traefik.http.routers.api.rule=PathPrefix(`/api`)' - 'traefik.http.routers.api.rule=PathPrefix(`/api`)'
- 'traefik.http.services.api.loadbalancer.server.port=3000' - 'traefik.http.services.api.loadbalancer.server.port=3000'
db:
extends:
file: ./compose.yml
service: db
idp: idp:
# Also see compose.yml extends:
file: ./compose.yml
service: idp
labels: labels:
- 'traefik.http.routers.idp.rule=PathPrefix(`/idp`)' - 'traefik.http.routers.idp.rule=PathPrefix(`/idp`)'
- 'traefik.http.services.idp.loadbalancer.server.port=7080' - 'traefik.http.services.idp.loadbalancer.server.port=7080'
@ -60,6 +67,17 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
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
dashboards: dashboards:
image: grafana/grafana:latest image: grafana/grafana:latest
ports: ports:
@ -70,3 +88,6 @@ services:
volumes: volumes:
dwengo_grafana_data: dwengo_grafana_data:
dwengo_loki_data:
dwengo_postgres_data:

View file

@ -36,17 +36,5 @@ services:
KC_HEALTH_ENABLED: 'true' KC_HEALTH_ENABLED: 'true'
KC_LOG_LEVEL: info 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: volumes:
dwengo_loki_data:
dwengo_postgres_data: dwengo_postgres_data: