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:
parent
24101f53fa
commit
71741924d0
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user