mirror of
https://github.com/jgeusebroek/docker-spotweb.git
synced 2025-06-03 06:07:23 +02:00
Add docker-compose example. Thanks Daniel Jongepier.
This commit is contained in:
parent
a44992dbc1
commit
8dd8dd73de
11
README.md
11
README.md
@ -9,6 +9,7 @@ An image running [ubuntu/20.04](https://hub.docker.com/_/ubuntu/) Linux and [Spo
|
||||
|
||||
You need a seperate MySQL / MariaDB server. This can of course be a (linked) docker container but also a dedicated database server.
|
||||
|
||||
If you would like to use docker-compose, a short guide can be found [below](#docker-compose). Thanks to [Daniel Jongepier](https://github.com/djongepier).
|
||||
|
||||
## Usage
|
||||
|
||||
@ -65,6 +66,16 @@ To enable automatic retrieval from within the container, use the `SPOTWEB_CRON_R
|
||||
|
||||
The container will try to auto-update the database when a newer version is released.
|
||||
|
||||
### Docker compose
|
||||
|
||||
An example `docker-compose.yml` is included. Create your base directory and edit the environment variables to suit your needs. After the initial run (`docker-compose up -d`) you will need to remove the `<base_dir>/spotweb/dbsettings.inc.php` because otherwise the install process won't proceed. Don't worry, your settings won't be lost.
|
||||
|
||||
After you deleted the file, point your browser to your install (ie. [http://localhost:81/install.php](http://localhost:81/install.php)) and follow the installation procedure.
|
||||
|
||||
It might give you an error saying it can't write the settings to file. You can ignore this.
|
||||
|
||||
When this all is fininished, restart spotweb using `docker-compose restart`. You should now have a working spotweb installation. (please note the `<base_dir>/spotweb/dbsettings.inc.php` file will be automatically recreated during the restart).
|
||||
|
||||
### Environment variables
|
||||
| Variable | Function |
|
||||
| --- | --- |
|
||||
|
40
docker-compose.yml
Normal file
40
docker-compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: "2.1"
|
||||
services:
|
||||
spotweb:
|
||||
image: jgeusebroek/spotweb
|
||||
container_name: spotweb
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PUID=1001
|
||||
- GUID=1001
|
||||
- TZ=Europe/Amsterdam
|
||||
- SPOTWEB_DB_TYPE=pdo_mysql
|
||||
- SPOTWEB_DB_HOST=spotweb_db
|
||||
- SPOTWEB_DB_PORT=3306
|
||||
- SPOTWEB_DB_NAME=spotweb
|
||||
- SPOTWEB_DB_USER=spotweb
|
||||
- SPOTWEB_DB_PASS=spotweb
|
||||
- "SPOTWEB_CRON_RETRIEVE=* */2 * * *"
|
||||
depends_on:
|
||||
- spotwebdb
|
||||
ports:
|
||||
- 81:80
|
||||
volumes:
|
||||
- <your_base_directory>/spotweb:/config
|
||||
|
||||
spotweb_db:
|
||||
image: linuxserver/mariadb
|
||||
container_name: spotwebdb
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PUID=1001
|
||||
- PGID=1001
|
||||
- MYSQL_ROOT_PASSWORD=spotweb
|
||||
- TZ=Europe/Amsterdam
|
||||
- MYSQL_DATABASE=spotweb
|
||||
- MYSQL_USER=spotweb
|
||||
- MYSQL_PASSWORD=spotweb
|
||||
volumes:
|
||||
- <your_base_directory>/mariadb:/config
|
||||
ports:
|
||||
- 3306:3306
|
Loading…
x
Reference in New Issue
Block a user