The django-based website and CMS for the Norwegian Trekking Association (DNT)
100K+
The django-based website and CMS for the Norwegian Trekking Association (DNT).
Set the DJANGO_CONFIGURATION environment variable to one of prod, staging or dev. See
sherpa/settings.py for more details.
SECRET_KEY_DEV: sets
Djangos SECRET_KEY for a dev
configurationAll other variables are optional, and related features will fail if left undefined. For a complete list of variables,
do something like grep -r "os.environ" sherpa/conf/.
To apply private settings that don't belong in the shared dev module, copy
sherpa/conf/private.sample.py
to sherpa/conf/private.py and define your personal settings there. The new file is ignored by git.
git clone [email protected]:Turistforeningen/sherpa.git
cd sherpa
git submodule update --init --recursive
Sherpa stores all secret settings in a git submodule. Note that you need access to retrieve these data. To ensure the correct revision of secret settings is checked out when you change your current branch, apply these git hooks:
cp util/git_hooks/post-checkout .git/hooks/
cp util/git_hooks/post-merge .git/hooks/
These commands may take some time complete.
docker-compose pull
docker-compose build --pull
# Import the database
docker-compose run --rm psql ./import.sh
# Install builder dependencies
docker-compose run --rm builder npm install
docker-compose run --rm builder npm run grunt:build
# Start up nginx, gunicorn, postgres and builder
docker-compose up -d
docker-compose logs [sherpa]
Recommended: Use Turistforeningen/docker-proxy.
Alternatively, to match the production setup, use haproxy from sherpa-prod:
git clone [email protected]:Turistforeningen/sherpa-prod.git
cd sherpa-prod
git submodule update --init --recursive
docker-compose build haproxy
docker-compose create haproxy
docker-compose start haproxy
# Configure haproxy's backend to the running nginx container
HAPROXY_CONTAINER=$(docker-compose ps -q haproxy)
cd ../sherpa
PORT=$(docker-compose port www 8080 | sed "s/0.0.0.0://")
docker exec -it ${HAPROXY_CONTAINER} ./route-backend.sh ${PORT}
Choose the hostname for your development site. local.dnt.no is a good name because it's not likely to be used in
production, and conforms to the SSL CN.
Point 127.0.0.1 to that name in /etc/hosts, then from the sherpa directory, edit the domain name for the main
site accordingly:
docker-compose run --rm sherpa ./manage.py sitedomain www.dnt.no local.dnt.no
You may now access https://local.dnt.no in your browser.
make test
Content type
Image
Digest
Size
192.4 MB
Last updated
almost 8 years ago
docker pull turistforeningen/sherpa:www-9ec1b9a2f