Base image: Alpine:latest
Main software: Spotweb
Packages: php7, openssl, apache2
You need a separate database server (both MySQL/MariaDB and PostgreSQL are supported through my config) or you can use SQLite within the container.
You can connect to the container with or without SSL You can also connect a reverse proxy to the exposed port and setup any sort of connection from there.
When you run the docker image for the first time without optional parameters it will download the master Spotweb branch into the webfolder and install the chosen php7 SQL module.
docker run --restart=always -d -p 80:80 \
--hostname=spotweb \
--name=spotweb \
-e TZ='Europe/Amsterdam' \
-e SQL='mysql'
jerheij/spotweb
After this browse to the exposed port and add "install.php" to it to run the configuration wizard.
To make the installation permanent (surviving an upgrade) you need to secure the /var/www/spotweb/dbsettings.inc.php configuration. The best way is to copy that file to your config folder and make a manual mapping:
docker run --restart=always -d -p 80:80 \
--hostname=spotweb \
--name=spotweb \
-v <location_dbsettings.inc.php>:/var/www/spotweb/dbsettings.inc.php \
-e TZ='Europe/Amsterdam' \
-e SQL='mysql'
jerheij/spotweb
The run command will keep the container "permanent".
The following docker-compose.yml example correspondents to the above:
services:
spotweb:
image: jerheij/spotweb:latest
container_name: spotweb
restart: always
ports:
- "192.168.1.1:80:80"
environment:
TZ: Europe/Amsterdam
SQL: mysql
volumes:
- config/dbsettings_spotweb.php:/var/www/spotweb/dbsettings.inc.php
This will enable the SSL modules and configuration in Apache2 and deploy an Apache2 SSL configuration on port 443. It expects the following files to be available:
- /etc/ssl/web/spotweb.crt
- /etc/ssl/web/spotweb.key
- /etc/ssl/web/spotweb.chain.crt
Suggested method is to mount a local directory with those certificates to /etc/ssl/webfolder:
...
volumes:
- ssl:/etc/ssl/web:ro
| Variable | Function | Optional |
|---|---|---|
TZ |
Timezone for PHP configuration | no |
SQL |
SQL type for Spotweb (sqlite, psql or mysql) | no |
SSL |
Enable or disable SSL support in apache (enabled/disabled) | yes |
UUID |
UID of the apache user, for mount and persistence compatibility | yes |
GUID |
GID of the apache group, for mount and persistence compatibility | yes |
VERSION |
Spotweb version, defaults to master branch but you can use a version tag from their git page | yes |
SPOTWEB_CRON_RETRIEVE |
Installs a cronjob within the container for running a retrieve task. Requires a variable in crontab format. | yes |
SPOTWEB_CRON_CACHE_CHECK |
Installs a cronjob within the container for running a cache check task. Requires a variable in crontab format. | yes |
I have introduced a "stable" tag instead of the "latest". The "latest" tag will be the git "master" branch while the "stable" tag will be the latest git tag.
For changes in the different versions see my github repo's commit messages.
Jerheij
Northguy