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

View file

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

View file

@ -36,17 +36,5 @@ services:
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: