refactor: use environment variables for ports in docker-compose

The docker-compose file has been updated to utilize environment variables for the MongoDB and MySQL ports. Instead of hard-coding the port numbers, the system now dynamically fetches port values from the .env file, which increases versatility and configurability.
This commit is contained in:
Mathis H (Avnyr) 2024-05-13 14:28:36 +02:00
parent 24101f53fa
commit 71741924d0
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -13,7 +13,7 @@ services:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
ports: ports:
- '3434:3306' - '${MYSQL_PORT}:3306'
volumes: volumes:
- ./mariadb/:/var/lib/mysql/ - ./mariadb/:/var/lib/mysql/
@ -22,7 +22,7 @@ services:
env_file: env_file:
- ./.env - ./.env
ports: ports:
- '2727:27017' - '${MONGO_PORT}:27017'
restart: always restart: always
logging: logging:
options: options: