Skip to content

Commit 31c39e5

Browse files
authored
Filestash: rolling config update (#1018)
Implement rolling config update for filestash. When content of config file is changed, docker service will be automatically updated without manual intervention needed. Related Issue(s): * #984
1 parent ef31aed commit 31c39e5

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

services/filestash/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
filestash_config.json
22
venv/*
3+
docker-compose.yml

services/filestash/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ up-local: up
4141

4242
# Helpers -------------------------------------------------
4343

44+
docker-compose.yml: docker-compose.yml.j2 .venv .env
45+
@$(call jinja, $<, .env, $@)
46+
4447
.PHONY: ${TEMP_COMPOSE}
4548
${TEMP_COMPOSE}: docker-compose.yml .env
4649
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

services/filestash/docker-compose.yml renamed to services/filestash/docker-compose.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ networks:
4545

4646
configs:
4747
filestash_config:
48+
name: ${STACK_NAME}_filestash_config_{{ "./filestash_config.json" | sha256file | substring(0,10) }}
4849
file: ./filestash_config.json

services/filestash/template.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
STACK_NAME=${STACK_NAME}
12
S3_BUCKET_NAME=${S3_BUCKET}
23
S3_ENDPOINT=${S3_ENDPOINT}
34
S3_SECURE=${S3_SECURE}

0 commit comments

Comments
 (0)