Compare commits

..

2 Commits

2 changed files with 21 additions and 17 deletions

View File

@ -40,6 +40,10 @@ The following settings are required to be adapted:
- `DJANGO_SECRET_KEY`: Provide a secret, and randomly generated key. Do not share this with anybody! - `DJANGO_SECRET_KEY`: Provide a secret, and randomly generated key. Do not share this with anybody!
- `DJANGO_ALLOWED_HOST`: Set this to the domain, the application will be reached at. E.g: `lab.example.com` - `DJANGO_ALLOWED_HOST`: Set this to the domain, the application will be reached at. E.g: `lab.example.com`
- `DJANGO_MEDIA_URL`: Set this to the media URL at which your webserver serves the `DJANGO_MEDIA_VOL` diretory. E.g: `media.lab.example.com/` Note the **slash at the end**. It is important. - `DJANGO_MEDIA_URL`: Set this to the media URL at which your webserver serves the `DJANGO_MEDIA_VOL` diretory. E.g: `media.lab.example.com/` Note the **slash at the end**. It is important.
- `DJANGO_USER_ID`: The user ID to run the application inside the docker container. This is the user id, that is used to write the to `DJANGO_STATIC_VOL` and `DJANGO_MEDIA_VOL`. Make sure the user has access.
- `DJANGO_USER_GID`: The group ID to run the application inside the docker container. This is the group id, that is used to write the to `DJANGO_STATIC_VOL` and `DJANGO_MEDIA_VOL`.
> Note: It is not recommended to run the docker container without a set `DJANGO_USER_ID` and `DJANGO_USER_GID`. It will default to `0 (root)`.
Once the environment is set up, the docker containers can be built and started. Run Once the environment is set up, the docker containers can be built and started. Run
``` ```
@ -166,7 +170,7 @@ server {
ssl_prefer_server_ciphers on; ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:1m; ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m; ssl_ession_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5; ssl_ciphers HIGH:!aNULL:!MD5;
error_page 502 /lab_down.html; error_page 502 /lab_down.html;

View File

@ -5,7 +5,7 @@ services:
shimatta-kenkyusho-web: shimatta-kenkyusho-web:
<<: *restart_policy <<: *restart_policy
build: . build: .
user: "${DJANGO_USER_ID}:${DJANGO_USER_GID}" user: "${DJANGO_USER_ID:-0}:${DJANGO_USER_GID:-0}"
volumes: volumes:
- "${DJANGO_STATIC_VOL:-./run/static}:/var/static" - "${DJANGO_STATIC_VOL:-./run/static}:/var/static"
- "${DJANGO_MEDIA_VOL:-./run/media}:/var/media" - "${DJANGO_MEDIA_VOL:-./run/media}:/var/media"