From 7e744f6b58a6b982620cea70915918677f0f7665 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 19 Dec 2021 20:25:34 +0000 Subject: [PATCH] build: add more environment variables for Docker --- .docker.env.example | 6 ++++++ docker-compose.yaml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.docker.env.example b/.docker.env.example index d6dd1a4..68125fc 100644 --- a/.docker.env.example +++ b/.docker.env.example @@ -2,3 +2,9 @@ MYSQL_DATABASE=drupal MYSQL_PASSWORD=drupal MYSQL_ROOT_PASSWORD=root MYSQL_USER=drupal + +# DOCKER_MYSQL_VOLUME=./db-data:/var/lib/mysql +DOCKER_MYSQL_VOLUME=mysql_data:/var/lib/mysql + +# DOCKER_WEB_PORT=80 +DOCKER_WEB_PORT=127.0.0.1:80 diff --git a/docker-compose.yaml b/docker-compose.yaml index 7ef9d77..64fa6a2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -19,7 +19,7 @@ services: php: condition: service_started ports: - - 80:80 + - "${DOCKER_WEB_PORT:-127.0.0.1:80}:80" restart: unless-stopped php: @@ -40,7 +40,7 @@ services: mysql: image: mariadb:10 volumes: - - mysql_data:/var/lib/mysql + - "${DOCKER_MYSQL_VOLUME:-./db-data:/var/lib/mysql}" - ./tools/assets/development:/docker-entrypoint-initdb.d env_file: - .docker.env