Skip to content

Commit 0a3d8b5

Browse files
author
Jeremy Heijlond
committed
Proper readme
1 parent 4e79c4a commit 0a3d8b5

File tree

1 file changed

+73
-2
lines changed

1 file changed

+73
-2
lines changed

README.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,73 @@
1-
# docker-spotweb
2-
Alpine based Docker Spotweb image
1+
An image running the latest [Alpine:latest](https://hub.docker.com/_/alpine/) build with PHP7 and [Spotweb](https://github.com/spotweb/spotweb).
2+
3+
## Requirements
4+
You need a separate database server (both MySQL/MariaDB and PostgreSQL are supported through my config) or you can use SQLite within the container.
5+
6+
## Usage
7+
8+
### Supported modes
9+
The container can be to connect to directly with or without SSL. You can also connect a reverse proxy to the exposed port and setup any sort of connection from there.
10+
11+
### Initial installation
12+
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.
13+
```
14+
docker run --restart=always -d -p 80:80 \
15+
--hostname=spotweb \
16+
--name=spotweb \
17+
-e TZ='Europe/Amsterdam' \
18+
-e SQL='mysql'
19+
jerheij/spotweb
20+
```
21+
After this browse to the exposed port and add "install.php" to it to run the configuration wizard.
22+
23+
### Permanent version
24+
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:
25+
26+
```
27+
docker run --restart=always -d -p 80:80 \
28+
--hostname=spotweb \
29+
--name=spotweb \
30+
-v <location_dbsettings.inc.php>:/var/www/spotweb/dbsettings.inc.php \
31+
-e TZ='Europe/Amsterdam' \
32+
-e SQL='mysql'
33+
jerheij/spotweb
34+
```
35+
The run command will keep the container "permanent".
36+
37+
### Docker compose example
38+
The following docker-compose.yml example correspondents to the above:
39+
```
40+
services:
41+
spotweb:
42+
image: jerheij/spotweb:latest
43+
container_name: spotweb
44+
restart: always
45+
ports:
46+
- "192.168.1.1:80:80"
47+
environment:
48+
TZ: Europe/Amsterdam
49+
SQL: mysql
50+
volumes:
51+
- config/dbsettings_spotweb.php:/var/www/spotweb/dbsettings.inc.php
52+
```
53+
### Required parameters
54+
- TZ: The timezone that will be added to the php configuation
55+
- SQL: SQL type it will use, it installs the PHP module based on this
56+
57+
### Optional parameters
58+
- SSL: enabled/disabled, this will control the Apache2 SSL support
59+
- UUID: UID of the apache user, for mount and persistence compatibility
60+
- GUID: GID of the apache group, for mount and persistence compatibility
61+
62+
##### SSL
63+
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:
64+
- /etc/ssl/web/spotweb.crt
65+
- /etc/ssl/web/spotweb.key
66+
- /etc/ssl/web/spotweb.chain.crt
67+
68+
Suggested method is to mount a local directory with those certificates to /etc/ssl/webfolder:
69+
```
70+
...
71+
volumes:
72+
- ssl:/etc/ssl/web:ro
73+
```

0 commit comments

Comments
 (0)