make volumes configurable

main
Andre Challier 2024-03-27 15:09:40 +01:00
parent 2c0d8a8527
commit 19dafed214
2 changed files with 7 additions and 6 deletions

3
.env
View File

@ -1,3 +1,4 @@
WEBHOOK_GIT_DATA_PATH=/path/to/webhook-git/data
WEBHOOK_SECRET=1234 WEBHOOK_SECRET=1234
NGINX_NETWORK=network-name NGINX_NETWORK=network-name
WEBHOOK_GIT_NETWORK=network-name WEBHOOK_GIT_NETWORK=network-name

View File

@ -5,8 +5,6 @@ services:
image: nginx:latest image: nginx:latest
volumes: volumes:
- static-files:/usr/share/nginx/html - static-files:/usr/share/nginx/html
- webhooks-git-ssh:/root/.ssh
- webhooks-git-data:/etc/webhook/
networks: networks:
- nginx-network - nginx-network
@ -15,14 +13,16 @@ services:
context: ./webhooks-git context: ./webhooks-git
dockerfile: Dockerfile dockerfile: Dockerfile
volumes: volumes:
- static-files:/etc/static-files - static-files:/html
- type: bind
source: ${WEBHOOK_GIT_DATA_PATH}
target: /data
networks: networks:
- webhooks-git-network - webhooks-git-network
volumes: volumes:
static-files: static-files:
webhooks-git-ssh: name: ${STATIC_FILES_VOLUME_NAME}
webhooks-git-data:
networks: networks:
nginx-network: nginx-network:
name: ${NGINX_NETWORK} name: ${NGINX_NETWORK}