Refactoring docker-compose.yml

This commit is contained in:
Benjamin Brummer
2024-11-26 12:50:59 +01:00
parent 24d49a4374
commit 535d6d4c06

View File

@@ -1,5 +1,3 @@
version: '3.8'
x-logging: &default-logging
options:
max-size: "10m"
@@ -13,13 +11,11 @@ services:
env_file:
- ./.env
volumes:
- ./.env:/var/www/html/.env
- ./php/php.ini:/usr/local/etc/php/php.ini
- ./.env:/var/www/html/.env
- ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
- app_storage:/var/www/html/storage
- app_cache:/var/www/html/bootstrap/cache
- image-public:/var/www/html/public:ro
- image_public:/var/www/html/public:ro
networks:
- app-network
depends_on:
@@ -41,8 +37,7 @@ services:
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- image-public:/var/www/html/public:ro
- image_public:/var/www/html/public:ro
networks:
- app-network
depends_on:
@@ -68,7 +63,16 @@ services:
networks:
- app-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}"]
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"-u${MYSQL_USER}",
"-p${MYSQL_PASSWORD}",
]
interval: 10s
timeout: 5s
retries: 5
@@ -109,5 +113,5 @@ volumes:
driver: local
redis_data:
driver: local
image-public:
image_public:
driver: local