Redmine container for Seattle Community Network
This is intended to be the thinnest shim possible on top of the Bitnami redmine container (https://hub.docker.com/r/bitnami/redmine/) to support receiving email via IMAP and secure storage of secrets. When possible, follow the Bitnami instructions.
This project will also act as an example of best practices for minimalist container-based projects with support tools to backup and recover container volumes and other documented operating procedures.
While this is intended to be a generic "container", it has only been tested with a standard Docker Engine install on a Unbuntu Linux environment.
To install the necessary tools, see: https://docs.docker.com/engine/install/ubuntu/
The process is essentially:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo docker run hello-world
- Clone the repo
https://github.com/Local-Connectivity-Lab/scn-redmine
.
git clone https://github.com/Local-Connectivity-Lab/scn-redmine redmine
cd redmine
- Deploy into a standard Docker engine:
docker compose up --build -d
- Login the first with the default credentials:
user
, pw:bitnami1
- Create a user with administrator privlidges:
- Click Administration in the top menu.
- Click Users in the left-hand column.
- Click New User near the top, on the right hand side.
- Fill out the Information and Authentication forms, including the Administrator checkbox.
- Click Create to save the data and create the new user.
- Sign out (top right) and login as the user you just created.
- Delete the temporary
user
user:- Go back to Administration -> Users
- On the line for the user
user
, client the Delete button. - Enter the username
user
to validate. - Click the Delete button.
- Create an
admin
bot user for netbot (if netbot is being used). - Create the "Discord ID" user custom field:
- Go to Administration -> Custom Fields
- Click New custom field near the top, on the right hand side.
- Select Users and click Next.
- For Name enter
Discord ID
- Click the Used as a filter checkbox
- Click Create to create the custom field.
- Create the "syncdata" custom field:
- Click New custom field near the top, on the right hand side.
- Select Tickets and click Next.
- For Name enter
syncdata
- Click the Used as a filter checkbox
- Click the Searchable checkbox
- Click the Bug, Feature, Support checkboxs under Trackers
- Click For all projects under Projects.
- Click Create to create the custom field.
- Create the "To/CC" user custom field...
- Click New custom field near the top, on the right hand side.
- Select Tickets and click Next.
- For Name enter
To/CC
- Click the Used as a filter checkbox
- Click the Searchable checkbox
- Click the Bug, Feature, Support checkboxs under Trackers
- Click For all projects under Projects.
- Click Create to create the custom field.
This process is used any time there is an update to the SCN Redmine container to deploy.
cd github/redmine
git pull
git submodule update --init --recursive
docker compose down
docker compose up --build -d
The provided cluster
script handles creating backups and restoring the cluster state from them.
To create a backup:
docker compose down
./cluster backup
docker compose up -d
This will create a file named clustername-datestamp.tgz
, like: redmine-202308051251.tgz
To restore a cluster from backup:
docker compose down
./cluster restore redmine-202308051251.tgz
docker compose up -d
The backup file is created by cluster backup
is a gzipped tar file wrapping a gzipped tar file for each volume mentioned in the docker-compose.yml
. It is automatically named with the cluster name (the parent directory of the compose yaml) and a to-the-minute precise datestamp.
The process for creating a backup:
- Creating a new date-stamped dir from the parent-dir name (same as compose): name-YYYYMMDDHHMM
- For each volume mentioned in the compose.yml 2.1 Run an empty container, with the volume and the backup dir mounted 2.2 Archive contents of volume: volume.tgz in the mounted backup dir, w/o parent-context
- tar-gzip the entire backyp dir into name-YYYYMMDDHHMM.tgz
Restoring the backup file with 'cluster restore backup-file.tgz'
- Untar the backup file
- For each tgz file in the backup: 2.1 Confirm a matching entry in the compose file 2.2 Run a simple container, mounting the volume and the backup 2.3 Import the backup into the volume with tar on the specific volume
- Cleanup the backup dir (leaving the backup.tgz untouched)