Skip to content

Tower and Redis Databases

SQL Database#

The Database configuration differs depending on how you choose to deploy Tower:

  • If you use the MySQL container provided in the deployment files, it will create a MySQL user and database for you.
  • If you use an external database service, you must create a MySQL user and database manually.

Generate User and Schema#

The following section describes the SQL statements that must be executed to initialize the Tower database, if you decide to use an external database service.

MySQL#

1
2
3
4
5
CREATE DATABASE tower;
ALTER DATABASE tower CHARACTER SET utf8 COLLATE utf8_bin;

CREATE USER 'tower' IDENTIFIED BY <password>;
GRANT ALL PRIVILEGES ON tower.* TO tower@'%' ;

MariaDB#

1
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER on tower.* TO tower@'%';

Environment Variables#

The following section describes how to configure the database environment variables in tower.env.

Warning

As of Tower v22.2.0, new and pre-existing MySQL configurations must use a new driver. Please set TOWER_DB_DRIVER=org.mariadb.jdbc.Driver.

All other MySQL-related TOWER_DB_* values should still be used.

MySQL#

1
2
3
4
5
6
TOWER_DB_URL=jdbc:mysql://YOUR-DB-HOST:3306/tower
TOWER_DB_DRIVER=org.mariadb.jdbc.Driver
TOWER_DB_DIALECT=io.seqera.util.MySQL55DialectCollateBin
TOWER_DB_USER=tower
TOWER_DB_PASSWORD=tower
FLYWAY_LOCATIONS=classpath:db-schema/mysql

MariaDB#

1
2
3
4
5
6
TOWER_DB_URL=jdbc:mariadb://YOUR-DB-HOST:3306/tower
TOWER_DB_DRIVER=org.mariadb.jdbc.Driver
TOWER_DB_DIALECT=io.seqera.util.MariaDB10DialectCollateBin
TOWER_DB_USER=tower
TOWER_DB_PASSWORD=tower
FLYWAY_LOCATIONS=classpath:db-schema/mariadb

Redis Database#

The Redis database can be configured in tower.env as follows:

1
TOWER_REDIS_URL=redis://YOUR-REDIS-HOST:6379
Back to top