Commit 2454cdf2 authored by Olaf Michaelis's avatar Olaf Michaelis
Browse files

Move allowed hosts setting into env

parent d10b73ae
......@@ -2,8 +2,8 @@ CURDIR=$(shell pwd)
DC_MASTER="dc_master.yaml"
DC_TEMP="docker-compose.yaml"
VARS_ENV=$(shell if [ -f variables.local ]; then echo variables.local; else echo variables.env; fi)
FINALLY_EXPOSED_PORT=$(shell cat ${CURDIR}/${VARS_ENV} | grep -Po "(?<=FINALLY_EXPOSED_PORT=)[0-9]+")
GLOBAL_PREFIX=$(shell cat ${CURDIR}/${VARS_ENV} | grep -Po "(?<=GLOBAL_PREFIX=).*")
FINALLY_EXPOSED_PORT=$(shell cat ${CURDIR}/${VARS_ENV} | grep -Po "(?<=FINALLY_EXPOSED_PORT=)[0-9]+")
all: preparations run_build tail_logs
preps: preparations
......
......@@ -19,7 +19,8 @@ SECRET_KEY = 'this is not a very secret key'
'''
The list of URLs und which this application available
'''
ALLOWED_HOSTS = ['localhost', 'ip6-localhost', '127.0.0.1', '[::1]', 'rdmo']
ALLOWED_HOSTS = [x.strip() for x in os.environ['ALLOWED_HOSTS'].split(',')]
# ALLOWED_HOSTS = ['localhost', 'ip6-localhost', '127.0.0.1', '[::1]', 'rdmo']
'''
The root url of your application, only needed when its not '/'
......
......@@ -25,6 +25,8 @@ During build four folders later used as volumes will be created under `vol/`. Th
Default settings are stored in the `variables.env`. You may want to change things to adjust RDMO to your local needs. As `variables.env` is part of the repo and would get overwritten if you pulled again the `makefile` contains a logic that lets you use a file called `variables.local` instead. If such a file exists the settings will be loaded from there. Simply copy `variables.env` to `variables.local` and feel free to change whatever you want.
Please note that you might need to change the `ALLOWED_HOSTS` entry depending on your server setup. The URL or IP under which RDMO is served needs to be allowed by putting it into the list. Usually the allowed hosts are declared in the `local.py`. In this docker compose setup we decided to move it into the environment variables and so the `variables.env` to raise awareness that the setting might need to be adjusted.
1. Build by running `make`
1. Maybe create an RDMO user
......
......@@ -5,6 +5,8 @@ FINALLY_EXPOSED_PORT=8484
# settings inside the containers
VOL=/vol
ALLOWED_HOSTS=localhost, ip6-localhost, 127.0.0.1, [::1], rdmo
POSTGRES_USER=rdmo
POSTGRES_PASSWORD=rdmoPGpass19
POSTGRES_DB=rdmo
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment