# Installation with Docker
The 4ALLPORTAL can easily be started in a Docker container. You need to
- install Docker
- create a
docker-compose.yml
Please also consider our system requirements. If you want to cluster your 4ALLPORTAL with Docker, take a look at our Docker cluster documentation.
For a general guide to Docker, take a look at their documentation here (opens new window).
# Install Docker
# For a productive system
Use your favorite package manager to download and install Docker Engine to your server. Find all details here (opens new window).
On Linux you can also install it manually with:
curl -fsSL https://get.docker.com | bash
# For local uses
In case you want to use Docker only local, e.g. for testing or developing purposes, download Docker Desktop:
# Install Docker Compose
With Docker Compose, you can use a file docker-compose.yml
to configure your 4ALLPORTALS's services and to start it with a single command.
- If you work with Docker Engine: You need to download Docker Compose here (opens new window)
- If you work with Docker Desktop: Docker Compose is already part of it and must not be installed separately.
# Create a Docker Compose
To start and configure the 4ALLPORTAL with Docker, you need to create a file named docker-compose.yml
.
# Example docker-compose.yml
version: "3"
services:
4allportal:
image: registry.4allportal.net/4allportal: <-- add latest version
ports:
- "8181:8181"
environment:
GENERAL_EXTERNAL_URL: https://your-4allportal-url.com
volumes:
- ./assets:/4allportal/data/data
- ./data:/4allportal/data
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: toor
ports:
- "3306:3306"
volumes:
- ./db:/var/lib/mysql
Image Version: Add the latest version of the 4App Core Engine here, e.g. 3.9
. Take a look at our Release Notes for the latest release.
For configuring your docker-compose, jump here.
# Starting the 4ALLPORTAL in Docker
To start your 4ALLPORTAL in a Docker container, now run the following commands:
docker-compose pull (-d)
docker-compose up (-d)
These commands yield a fully functioning 4ALLPORTAL that's reachable over localhost
.
# Default Docker image
The Docker image which is created, comes with the following default environment variables:
Variable | Default / options | Description |
---|---|---|
DATABASE_HOST | db (other option: URL) | a docker variable to a database service or an URL to an external DB |
DATABASE_PASSWORD | toor | a valid password for the DATABASE_USER |
DATABASE_USER | root | a valid user account for accessing the database |
DEBUG | false (other option: false) | sets the JVM to debug mode with port 8001, and sets the logging level to DEBUG |
GENERAL_ADMIN_EMAIL | administrator@4allportal.com | email address of the system administrator account |
GENERAL_ADMIN_PASSWORD | crossmedia | password of the system administrator account |
GENERAL_ADMIN_USER_NAME | administrator | representative name of the system administrator |
GENERAL_DEFAULT_LANGUAGE | en_US | default local of the system |
GENERAL_EXTERNAL_URL | https://your-4allportal-url.com | external URL of the 4ALLPORTAL instance |
MAIL_ENABLED | true (other option: false) | enables mail functionality |
MAIL_HOST | mail.4allportal.cloud | hostname or IP address of the mail server |
MAIL_PORT | 25 | port of the mail server |
MAIL_SYSTEM_FROM_EMAIL | no-reply@4allportal.cloud | email address for emails from your system |
MAIL_SYSTEM_FROM_NAME | 4ALLPORTAL | name that shows as sender of system emails |
MAIL_SYSTEM_MAIL_SENDER | no-reply@4allportal.cloud | email address which shows as sender instead of system email address |
MAIL_USE_AUTHENTICATION | false (other option: true) | activates the user authentication for the chosen mail server |
MAIL_USE_REPLY_TO | true (other option: false) | activates the reply-to email header and address |
MAGICK_MEMORY_LIMIT * | 256MiB | maximum amount of memory in bytes to allocate for the pixel cache from the heap |
MAGICK_AREA_LIMIT * | 256MP | maximum width * height of an image that can reside in the pixel cache memory |
MAGICK_DISK_LIMIT * | 1GiB | maximum amount of disk space in bytes permitted for use by the pixel cache |
MAGICK_MAP_LIMIT * | 512MiB | maximum amount of memory map in bytes to allocate for the pixel cache |
MAGICK_HEIGHT_LIMIT * | 16KP | maximum height of an image |
MAGICK_WIDTH_LIMIT * | 16KP | maximum width of an image |
* The 4ALLPORTAL uses ImageMagick to convert images and create previews. For more details on the ImageMagick environment variables, take a look at their documentation (opens new window).
Please note: These variables are not necessarily part of a docker-compose.yml
. You may add them to the environment section if you need / want to change the default though.
# Configure the default image
The environment variables from our default image as seen above are automatically injected in the 4ALLPORTAL configuration and fill fields in the 4ALLPORTAL GUI each time the docker environment starts.
If you want to configure these settings, change them using your docker-compose.yml
. Just add the variables you want to alter to section 4allportal/environment
and change their value as desired.
You must always alter our default e.g. if you use your own mail sever.
Please note: The contents / variables of your docker-compose.yml
- will always overwrite the default image with each reload / start of Docker. (Means you must alter the docker-compose to configure something other than our default, e.g. a mail server.)
- will always overwrite the settings made in the GUI of your 4ALLPORTAL. (Means you must alter the docker-compose if I want to use your GUI for configuration.)
# Configuring variables via GUI
If you want to make configurations via your 4ALLPORTAL GUI (i.e. you wish the fields there to be empty), the corresponding variables in your docker-compose.yml
must be set, but empty:
- define the variables / fields you want to see empty in your GUI
- find (or add) them in your
docker-compose.yml
environment - delete all entries made here
- save your
docker-compose.yml
- start the container
Example: Mail server
If you want to make your mail server settings in your admin snap-in General system configurations/System settings/Mail server
, add or adjust the following variables to your docker-compose.yml
like this:
MAIL_ENABLED=
MAIL_USE_AUTHENTICATION=
MAIL_HOST=
MAIL_USE_REPLY_TO=
MAIL_SYSTEM_FROM_NAME=
MAIL_SYSTEM_MAIL_SENDER=
MAIL_SYSTEM_FROM_EMAIL=
Please note: All variables in your docker-compose.yml
with no value will overwrite the default from the image and lead to an empty field in the GUI. If you make adjustments in your GUI now, they will not be overwritten with empty values again.
# Further environment variables
If you need them, you may also add variables that are not part of the image. Some additional variables may be:
Variable | Example / options | Description |
---|---|---|
GENERAL_ADMIN_FIRSTNAME | John | first name of the system administrator |
GENERAL_ADMIN_LASTNAME | Doe | last name of the system administrator |
DATABASE_TYPE | mysql / mariadb | type of the database to configure the JDBC driver |
MAIL_USER | no-reply@example.com | user name of the mail server (only if MAIL_USE_AUTHENTICATION is active) |
MAIL_PASSWORD | t0p_s3cr3t | user password of the mail server (only if MAIL_USE_AUTHENTICATION is active) |
MAIL_SECURITY | ssl / starttls | encryption protocol used by the mail server |
MAIL_SYSTEM_REPLY_TO_EMAIL | no-reply@example.com | email address that shows as sender instead of system email address (only if MAIL_USE_REPLY_TO is active) |
Please note: We generally support all Spring environment variables. For details, take a look here (opens new window).
# Disable Healthcheck
The Docker Healthcheck allows outside systems to monitor the health of the 4ALLPORTAL. The default allows the 4ALLPORTAL two minutes to boot. If in that time the 4ALLPORTAL doesn't send a valid response, it's marked as UNHEALTHY
. Currently, this is only relevant for Kubernetes, Docker Compose and Traefik.
Kubernetes and Docker Compose restart the container and Traefik stops routing traffic to the container.
If you want to disable the Healthcheck in Docker Compose, use the following option:
healthcheck:
disable: true
For more details on Kubernetes and Traefik and their configuration, please refer to the Kubernetes (opens new window) and Traefik (opens new window) documentations.