bc-web – service config JDBC
This is a configuration service that connects a JDBC compatible database. BeyondCron is distributed with support for MySQL and PostgreSQL databases. With the inclusion of the the appropriate JDBC driver, and creation of the the required table, BeyondCron is able to support other databases.
Environment variables
BEYONDCRON_CONFIG_SERVICE | JDBC |
JDBC_URL | Database connection URL. |
JDBC_USER | Database user name. |
JDBC_PASSWORD | Database user password. If the password is in the format file:filename,, then the password will be read from filename,. |
JDBC_TABLE_CONFIG | Name of table to use. |
JDBC_… | Optional MySQL configuration properties. |
BEYONDCRON_CONFIG_SERVICE | JDBC |
JDBC_URL | Database connection URL. |
JDBC_USER | Database user name. |
JDBC_PASSWORD | Database user password. If the password is in the format file:filename,, then the password will be read from filename. |
JDBC_TABLE_CONFIG | Name of table to use. |
JDBC_… | Optional PostgeSQL configuration properties. |
BEYONDCRON_CONFIG_SERVICE | JDBC |
JDBC_URL | Database connection. |
JDBC_USER | Database user name. |
JDBC_PASSWORD | Database user password. If the password is in the format file:filename,, then the password will be read from filename. |
JDBC_TABLE_CONFIG | Name of table to use. |
JDBC_… | Optional database configuration properties. |
Example
Setup JDBC.
$ export JDBC_URL=jdbc:mysql://database.example.com:3306/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=Secret!
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server
…
$ export JDBC_URL=jdbc:postgresql://database.example.com:5433/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=Secret!
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server
…
$ export JDBC_URL=jdbc:…
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=Secret!
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server
…
Setup JDBC with the password being read from a file.
$ export JDBC_URL=jdbc:mysql://database.example.com:3306/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=file:/home/bc-daemon/.jdbc/jdbc.password
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server
…
$ export JDBC_URL=jdbc:postgresql://database.example.com:5433/beyondcron
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=file:/home/bc-daemon/.jdbc/jdbc.password
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server
…
$ export JDBC_URL=jdbc:…
$ export JDBC_USER=beyondcron
$ export JDBC_PASSWORD=file:/home/bc-daemon/.jdbc/jdbc.password
$ export JDBC_TABLE_CONFIG=bc_config
$ export BEYONDCRON_CONFIG_SERVICE=JDBC
$ /opt/bc-server/bin/bc-server
…
See also
Reference
- MySQL
- MySQL URL
- MySQL Properties
- PostgreSQL
- PostgreSQL JDBC Driver