🇩🇪
Dieses Projekt / der Betrieb von FE2 als Docker Container ist ein experimentelles Feature, für das keinerlei Support-Anspruch besteht. Wir freuen uns über Bug-Reports die ins Ticket-System eingestellt werden, sollte ein Fehler auffallen. Allerdings besteht kein Anspruch auf Behebung. Darüber hinaus ist es uns leider unmöglich beim Betrieb der Docker-Umgebung zu unterstützen.
🙋♂️ Dieses Projekt richtet sich an professionelle Nutzer mit fundierten Linux / Docker Kenntnissen.
🇺🇸
This project / running FE2 as docker container is an experimental feature that comes without any support. When a bug is detected we're happy to know about it as a support ticket, but we cannot assist you with running your docker deployments.
🙋♂️ This project addresses professional users with profound Linux and Docker knowledge.
Running this containers requires a "real" linux environment (either physical or virtual, see below).
We recommend either a real root server or a "pseudo" root server offering dedicated memory and CPU resources.
Many cheap vServers make use of shared resources and might lead to poor user experience / reliability.
⭐ For many years we made good experience with netcup and their root server offerings. They combine the advantages of dedicated root servers with virtual servers. CPU and memory are not shared with other customers, which leads to a very high performance.
Tests were performed on Ubuntu Server 20.04 LTS and 22.04 LTS
The following versions were installed
- Docker version 20.10.23
- docker-compose version 1.29.2
- git version 2.34.1
💡 We recommend running Ubuntu Server
docker-compose.yml
file specifies version 2.28, it's not supported to upgrade to 2.31 directly by just changing version information.
The upgrade path is:
- 2.28 -> 2.29
- 2.29 -> 2.30
- 2.30 -> 2.31
A major upgrade can also affect the other containers specified in the docker-compose.yml
file (most likely the mongoDB database version). Before upgrading always check the corresponding git branch of this project. We'll offer compatible environments on release branches, e.g. release/2.28, release/2.29 etc.
💡 Upgrades within major releases (aka minor upgrades) are supported, for example:
Upgrading from 2.28.351 to 2.28.406 by just changing fe2_app's image version followed by a docker-compose down && docker-compose up -d
is fine.
We'll make sure that these upgrades work flawlessly.
🪟 While it might work to copy all files from a windows installation over, it's not supported, so please don't ask for help after doing so.
- clone the repository to a local folder, e.g. /home/username/docker
- cd to fe-docker
- copy config.template/data/logback.xml to data/fe2/config/data/
- copy docker-compose.yml.template to docker-compose.yml
- copy or move config.env.example to config.env
- adjust all variables in config.env
- Edit the "hostname" property in docker-compose.yml to match your desired hostname. This is important for correct functionality of the system outage function.
- docker-compose up (-d)
SSL encryption can be enabled by changing the variable CERTBOT_ENABLED (false|true) inside config.env
There are two possible options:
When CERTBOT_ENABLED
is set to false
, the webserver is reachable on port 80 (default, unless changed in docker-compose.yml
)
Use this scenario for testing and if SSL termination will be handled by another webserver already installed (nginx, traefik, apache, haproxy, etc.)
If port 80 is already in use, another one (not already in use; check with netstat) can be chosen inside docker-compose.yml
When CERTBOT_ENABLED
is set to true
, the webserver is reachable on port 443 (and 80, but http will be redirected to https automatically).
The following prerequisites must be met:
- Unbound ports 80 / 443 locally -> no other process may be running using one of these ports. Check with
netstat -tulpn | grep LISTEN | grep -E ':80|:443'
⚠️ Ports 80 + 443 must not be changed indocker-compose.yml
, they must be left unchanged, otherwise let's encrypt won't work- Valid DNS A record pointing to the hosts public IP address, e.g. fe2.meinefeuerwehr.de
- Ports 80 and 443 reachable from outside (port forwarding if required, firewall exception (type TCP), etc.) Although http will be redirected to https when accessing FE2 web interface, port 80 must remain open all the time for let's encrypt (periodic certificate renewal task).
This DNS A record must be configured inside config.env
file as variable CERTBOT_DOMAIN
. Moreover a valid email address must be configured for let's encrypt information emails as variable CERTBOT_EMAIL
.
⌛ After starting an SSL enabled FE2 docker instance for the first time, it takes about 15-30 minutes to generate encryption specific parameters (DH parameters). This is normal. The progress can be visualized using docker logs -f fe2_nginx
💡 During this time, the FE2 web interface won't be accessible.
When you're locked out, emergency access to FE2 is possible via port 64112 after activation in docker-compose.yml
. Change the line - 64112 to - "64112:64112" (port mapping for the fe2_app service NOT fe2_nginx) save and restart with docker-compose down && docker-compose up -d
Open a browser of your choice and navigate to http://{DOCKER_HOST_IP}:64112
💡 The emergency binding will not use https://
Inside 'scripts/backup' several files can be found to perform backup and restore tasks. A cron example is also contained. Copy all files locally, including 'rsync_ignore.txt'. Afterwards follow the instructions inside the scripts to get started.
Advanced usage / deployment options for professional users.
💡 No official support is offered for these use cases.
The following must be configured for multiple FE2 docker containers on the same host:
One possible scenario among others: Create a new directory for each deployment and checkout the git repository to each, then setup the following:
-
Unique activation names:
config.env
: Use a uniqueFE2_ACTIVATION_NAME
variable for each deployment. This is necessary for activation purposes. -
SSL:
config.env
: The variableCERTBOT_ENABLED
must be set tofalse
(or at most 1 container is allowed to run with certbot enabled using default ports 80 + 443) -
Unique container names: In each
docker-compose.yml
every containedcontainer_name
declaration must be adjusted to a UNIQUE name, e.g.- fe2_database -> fe2_database_2
- fe2_app -> fe2_app_2
- fe2_nginx -> fe2_nginx_2
otherwise
docker-compose up / down
calls will interfere and stop unintended containers.Suggestion: Rename every
container_name
inside the firstdocker-compose.yml
file to '_1', inside the second compose file to '_2', etc. Check withdocker ps
that all intended containers are running, using the adjusted container names. -
Unique port combinations: In each
docker-compose.yml
file, setup a unique port combination, for example:- First container:
- "80:80"
- "443:443"
- Second container:
- "81:80"
- "444:443"
- Third container:
- "82:80"
- "445:443"
- etc.
The left hand side of the port definition must be not already in use by the system (check with netstat; see above), thus in our example the ports 80-82;443-445 must NOT already be used by any process of the system.
- First container: