From ab5b08393653ce4c427839fd8d677823ba21220e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 10 Mar 2020 00:38:56 +0300 Subject: [PATCH] Docker volumes update --- Dockerfile | 4 ++-- docker-compose.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3874fe3..0585f91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY . /app WORKDIR /app #Remove .git and other dirs and files -RUN rm -rf .git/ .idea/ .DS_Store +RUN rm -rf .git/ .idea/ .DS_Store sessions/ .env RUN pecl install apcu ev \ && docker-php-ext-enable apcu ev \ @@ -21,7 +21,7 @@ RUN \ | sed -e 's/IP_WHITELIST=127.0.0.1/IP_WHITELIST=/g' \ > .env; -VOLUME ["/app/sessions", "/app/.env:/app/.env"] +VOLUME ["/app/sessions"] EXPOSE 9503 diff --git a/docker-compose.yml b/docker-compose.yml index 57ee458..8c489fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,9 @@ services: restart: unless-stopped ports: - "127.0.0.1:9503:9503" + volumes: + - ./sessions:/app/sessions + - ./.env:/app/.env logging: driver: "json-file" options: