From d86126bf70c9493e4aa03d193828958ead9bcf8a Mon Sep 17 00:00:00 2001 From: Logan Marchione Date: Thu, 30 Mar 2023 21:13:18 -0400 Subject: [PATCH] Add Docker Compose for debugging --- README.md | 14 +++++++++++++- docker-compose-dev.yml | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docker-compose-dev.yml diff --git a/README.md b/README.md index 4171921..97159c6 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Below is an example docker-compose.yml file. version: '3' services: webdav: - container_name: webdav + container_name: docker-webdav-nginx restart: unless-stopped environment: - WEBDAV_USER=user @@ -72,4 +72,16 @@ volumes: driver: local ``` +Below is an example of running locally (used to edit/test/debug). +``` +# Build the Dockerfile +docker compose -f docker-compose-dev.yml up -d + +# View logs +docker compose -f docker-compose-dev.yml logs -f + +# Destroy when done +docker compose -f docker-compose-dev.yml down +``` + ## TODO diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..0c03d1c --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,24 @@ +version: '3' +services: + webdav: + container_name: docker-webdav-nginx + restart: unless-stopped + build: + context: . + dockerfile: Dockerfile + environment: + - WEBDAV_USER=user + - WEBDAV_PASS=password1 + networks: + - app + ports: + - '8888:80' + volumes: + - 'webdav:/var/www/webdav' + +networks: + app: + +volumes: + webdav: + driver: local \ No newline at end of file