Moved database port mapping to central port configuration file

This commit is contained in:
2025-07-13 23:06:11 +02:00
parent 6fbe550afe
commit fb0ca533ae
7 changed files with 19 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
hostname: "svc-db-postgres"
network: "<< defaults_applications[svc-db-postgres].hostname >>"
port: 5432
volume: "<< defaults_applications[svc-db-postgres].hostname >>"
docker:
services:

View File

@@ -17,7 +17,7 @@
networks:
- name: "{{ applications | get_app_conf(application_id, 'network', True) }}"
published_ports:
- "127.0.0.1:{{ applications | get_app_conf(application_id, 'port', True) }}:5432"
- "127.0.0.1:{{ database_port }}:5432"
volumes:
- "{{ applications['svc-db-postgres'].volume }}:/var/lib/postgresql/data"
restart_policy: "{{ docker_restart_policy }}"