Skip to content

Commit 5a0b309

Browse files
committed
Add nginx shared media volume and configure media location.
This fixes an issue when accessing/saving the cfg assets and stores the media assets in a volume making the assets persist when the container changess fixes safe-global#174
1 parent afddeea commit 5a0b309

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
volumes:
22
nginx-shared-txs:
33
nginx-shared-cfg:
4+
nginx-shared-media:
45

56
x-healthcheck-db-template: &pghealthcheck
67
healthcheck:
@@ -33,6 +34,7 @@ services:
3334
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
3435
- nginx-shared-txs:/nginx-txs
3536
- nginx-shared-cfg:/nginx-cfg
37+
- nginx-shared-media:/cfg-media
3638
depends_on:
3739
- txs-web
3840
- cfg-web
@@ -143,6 +145,7 @@ services:
143145
tty: true
144146
volumes:
145147
- nginx-shared-cfg:/nginx
148+
- nginx-shared-media:/app/src/media
146149
env_file:
147150
- container_env_files/cfg.env
148151
depends_on:

docker/nginx/nginx.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ http {
112112
expires 365d;
113113
}
114114

115+
location /cfg/media {
116+
alias /cfg-media;
117+
expires 365d;
118+
}
119+
115120
location /cfg/ {
116121
proxy_set_header Host $host;
117122
proxy_set_header X-Forwarded-Host $server_name;

0 commit comments

Comments
 (0)