Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Docker docs, auto-generate secret key #1376

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/release-handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ packages from the testing branch into stable. Again, commit to gh-pages and so
forth. Please see "Rolling the deb repo" section for more details.


Docker repositories
-------------------
The Docker repositories is hosted at Docker Hub and currently updated manually
when a new release is built. The NIPAP organization can be found at
https://hub.docker.com/u/nipap.

There are two repositories, one for nipapd and one for the web UI, nipap-www.
Each build is tagged with the NIPAP version and there are tags pointing towards
the latest stable ("stable") and testing ("testing") releases.


NEWS / Changelog
----------------
There is a NEWS file outlining the differences with every version. It can
Expand Down Expand Up @@ -142,6 +153,30 @@ tag and write a post on Google+ in the NIPAP community and share it from the
NIPAP account.


Rolling the Docker images
-------------------------
Make sure you have a clean repo::
make clean

Then build the images::
docker build -t nipap/nipapd:vX.Y.Z -f Dockerfile.nipapd .
docker build -t nipap/nipap-www:vX.Y.Z -f Dockerfile.www .
Add the testing-tag and push::
docker tag nipap/nipapd:vX.Y.Z nipap/nipapd:testing
docker tag nipap/nipap-www:vX.Y.Z nipap/nipap-www:testing
docker login -u *username*
docker push nipap/nipapd:vX.Y.Z
docker push nipap/nipapd:testing
docker push nipap/nipap-www:vX.Y.Z
docker push nipap/nipap-www:testing

Once the new version has been tested for a bit, also tag the version with the stable-tag and push:
docker tag nipap/nipapd:vX.Y.Z nipap/nipapd:stable
docker tag nipap/nipap-www:vX.Y.Z nipap/nipap-www:stable
docker push nipap/nipapd:stable
docker push nipap/nipap-www:stable


Uploading to PyPi
-----------------
pynipap should be available on PyPi::
Expand Down
5 changes: 5 additions & 0 deletions nipap-www/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#! /bin/bash

# If WWW_SECRET_KEY is not set, generate random string
if [ ! -v WWW_SECRET_KEY ]; then
export WWW_SECRET_KEY=`tr -dc A-Za-z0-9 </dev/urandom | head -c 16`
fi

# Create NIPAP configuration file
if [ ! -e /etc/nipap/nipap.conf ]; then
envtpl --keep-template --allow-missing -o /etc/nipap/nipap.conf /nipap/nipap.conf.dist
Expand Down
Loading