Skip to content

Commit 0d404cd

Browse files
PhilippMDoernerPhilippMDoerner
PhilippMDoerner
authored andcommitted
Add config for db-dumps
1 parent 46971ce commit 0d404cd

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

buildFiles/nginx/nginx_prod.conf

+18
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@ http {
131131
upload_progress_json_output;
132132
report_uploads uploads;
133133
}
134+
135+
location /db_dumps/ {
136+
# Serves files from /db_dumps/ but checks for authentication first
137+
auth_request /auth ;
138+
add_header Cache-Control 'public, max-age=604800'; # cache for 1 week
139+
alias /db_dumps/;
140+
}
141+
142+
# Authentication check for files
143+
location = /auth {
144+
internal;
145+
proxy_redirect off;
146+
proxy_pass_request_headers on;
147+
proxy_pass_request_body off;
148+
proxy_set_header Content-Length "";
149+
proxy_pass http://nswebserver:8080/token/validate/;
150+
}
151+
134152

135153
# Passes requests on to the application server "nimstoryfont"
136154
location /wiki1/api {

docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
- /home/isofruit/dev/nimstoryfont/media:/imagemedia # To serve images
1414
- /home/isofruit/Music/session_audio_backup:/session_audio # To serve audio files
1515
- /home/isofruit/Music/session_audio_backup/extended:/session_audio/extended # To serve audio files
16+
- /home/isofruit/dev/nimstoryfont/buildFiles/nimstoryfont/local_only_db_dumps:/db_dumps # For database access
1617
container_name: production_nginx
1718
restart: on-failure
1819

dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ RUN mkdir -p /cert/live/www.aldrune.com
2121
RUN mkdir -p /cert/archive/www.aldrune.com
2222
RUN mkdir /imagemedia
2323
RUN mkdir /tmpfiles
24+
RUN mkdir /db_dumps
2425
# The session_audio directory will be mapped to a directory that also contains a /extended dir. That is an extra volume of Linode for storage
2526
RUN mkdir /session_audio
2627
RUN ln -s /session_audio /audiodownloads

0 commit comments

Comments
 (0)