Git Product home page Git Product logo

docker-spotweb's Introduction

Docker Spotweb image

An image running ubuntu/18.04 Linux and Spotweb.

Requirements

You need a seperate MySQL / MariaDB server. This can of course be a (linked) docker container but also a dedicated database server.

Usage

Initial Installation

First create a database on your database server, and make sure the container has access to the database, then run a temporary container.

docker run -it --rm -p 80:80 \
	-e TZ='Europe/Amsterdam' \
	vincentbitter/spotweb

Please NOTE that there is no database configuration here, this will enable the install process.

The run the Spotweb installer using the web interface: 'http://yourhost/install.php'. This will create the necessary database tables and users. Ignore the warning when it tries to save the configuration.

When you are done, exit the container (CTRL/CMD-c) and configure the permanent running container.

Permanent installation

docker run --restart=always -d -p 80:80 \
	--hostname=spotweb \
	--name=spotweb \
	-v <hostdir_where_config_will_persistently_be_stored>:/config \
	-e 'TZ=Europe/Amsterdam' \
	-e 'SPOTWEB_DB_TYPE=pdo_mysql' \
	-e 'SPOTWEB_DB_HOST=<database_server_hostname>' \
	-e 'SPOTWEB_DB_NAME=spotweb' \
	-e 'SPOTWEB_DB_USER=spotweb' \
	-e 'SPOTWEB_DB_PASS=spotweb' \
	vincentbitter/spotweb:hotfix-403

Please NOTE that the volume is optional. Only necessary when you have special configuration settings.

You should now be able to reach the spotweb interface on port 80.

Automatic retrieval of new spots

To enable automatic retrieval, you need to setup a cronjob on either the docker host or within the container.

Automatic retrieval of new spots on the docker host

To enable automatic retrieval, you need to setup a cronjob on the docker host.

*/15 * * * * docker exec spotweb su -l www-data -s /usr/bin/php /var/www/spotweb/retrieve.php >/dev/null 2>&1

This example will retrieve new spots every 15 minutes.

Automatic retrieval of new spots from within the container

To enable automatic retrieval from within the container, use the SPOTWEB_CRON_RETRIEVE variable to specify the cron timing for retrieval. For example as additional parameter to the docker run command:

-e 'SPOTWEB_CRON_RETRIEVE=*/15 * * * *'

Updates

The container will try to auto-update the database when a newer version is released.

Environment variables

Variable Function
TZ The timezone the server is running in. Defaults to Europe/Amsterdam.
SPOTWEB_DB_TYPE Database type. Use pdo_mysql for MySQL.
SPOTWEB_DB_HOST The hostname / IP of the database server.
SPOTWEB_DB_NAME The database used for spotweb.
SPOTWEB_DB_USER The database server username.
SPOTWEB_DB_PASS The database server password.
SPOTWEB_CRON_RETRIEVE Cron schedule for article retrieval. E.g. */15 * * * * for every fifteen minutes.
SPOTWEB_CRON_CACHE_CHECK Cron schedule for article cache sanity check. E.g. 10 */1 * * * for 10 minutes after every hour.

License

MIT / BSD

Author Information

Jeroen Geusebroek

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.