It is intended that this component be run using docker. It supports MySql and will soon also support postgresql and MS SQL Server.
You need to add a database/schema and a user to the database manually.
This component requires a MySQL database. Create a database and user with the following steps:
- Connect to MySQL as root or admin user:
(change <password> to your password)
(change <TODO> to the project name)
docker run -it --rm --network abstratium mysql mysql -h abstratium-mysql --port 3306 -u root -p<password>
DROP USER IF EXISTS 'TODO'@'%';
CREATE USER 'TODO'@'%' IDENTIFIED BY '<password>';
DROP DATABASE IF EXISTS TODO;
CREATE DATABASE TODO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON TODO.* TO TODO@'%'; -- on own database
FLUSH PRIVILEGES;
EXIT;This project will automatically create all necessary tables and any initial data when it first connects to the database.
New versions will update the database as needed.
TODO any env vars that need generating are to be described here.
- Generate TODO (32+ characters recommended):
Use this output for
openssl rand -base64 32
TODO_ENV_VAR_NAME.
-
Pull the latest image from GitHub Container Registry:
docker pull ghcr.io/abstratium-dev/TODO:latest
-
Run the container:
_Replace all TODO_... values with the values generated above.
docker run -d \
--name TODO \
--network your-network \
-p 127.0.0.1:4108x:808x \
-p 127.0.0.1:900x:900x \
-e QUARKUS_DATASOURCE_JDBC_URL="jdbc:mysql://your-mysql-host:3306/TODO" \
-e QUARKUS_DATASOURCE_USERNAME="TODO_YOUR_USERNAME" \
-e QUARKUS_DATASOURCE_PASSWORD="TODO_YOUR_SECURE_PASSWORD" \
-e COOKIE_ENCRYPTION_SECRET="TODO_YOUR_COOKIE_ENCRYPTION_SECRET" \
ghcr.io/abstratium-dev/TODO:latestRequired Environment Variables:
QUARKUS_DATASOURCE_JDBC_URL: Database connection URL (format:jdbc:mysql://<host>:<port>/<database>)QUARKUS_DATASOURCE_USERNAME: Database usernameQUARKUS_DATASOURCE_PASSWORD: Database password (use strong, unique password)COOKIE_ENCRYPTION_SECRET: Cookie encryption secret (min 32 chars, generate withopenssl rand -base64 32)CSRF_TOKEN_SIGNATURE_KEY: CSRF token signature key (min 32 chars, generate withopenssl rand -base64 64 | tr -d '\n')
Optional Environment Variables:
TODO_ENV_VAR_NAME: TODO
-
Verify the container is running:
docker ps docker logs TODO curl http://localhost:4108x/m/health curl http://localhost:4108x/m/info
-
Access the application:
- Main application: http://localhost:4108x
- Management interface: http://localhost:900x/m/info
Before installation, ensure you have:
- Docker installed and running
- MySQL 8.0+ database server
- Network connectivity between Docker container and MySQL
- OpenSSL for generating JWT keys
- GitHub account (if pulling from GitHub Container Registry)
- nginx or similar for reverse proxying and terminating TLS
TODO
This component requires that users can authenticate using an oauth authorization server. That requires that an administrator signs into something like abstratium-abstrauth first, to create the oauth2 client. The callback url should be http://localhost:808x/oauth/callback and one for the production environment, also ending in /oauth/callback. Use the client_id and client_secret that it provides, to set the values of the environment variables above, so that users can sign in.
TODO describe other functionality here.
This project provides several endpoints for monitoring:
-
Health Check:
http://localhost:900x/m/health- Returns application health status
- Includes database connectivity check
-
Info Endpoint:
http://localhost:900x/m/info- Returns build information, version, and configuration
- Useful for verifying deployment
- Check Docker logs:
docker logs TODO - Verify environment variables are set correctly
- Ensure database is accessible from container
- Check network connectivity:
docker network inspect your-network
- Verify MySQL is running:
mysql -u TODO -p -h your-mysql-host - Check firewall rules allow connection on port 3306
- Verify database user has correct permissions
- Check JDBC URL format is correct
- Verify keys are correctly base64-encoded
- Ensure public key matches private key
- Check key length is at least 2048 bits
- Verify no extra whitespace in environment variables
- Never use default/test keys in production
- Store secrets in secure secret management systems (e.g., HashiCorp Vault, AWS Secrets Manager)
- Use strong, unique passwords for database and admin accounts
- Enable HTTPS in production (configure reverse proxy)
- Regularly update the Docker image to get security patches
- Monitor logs for suspicious activity
- Backup database regularly
- Limit network access to database and management interface
- Rotate JWT keys periodically (requires user re-authentication)
- TODO e.g. RFC 7636 - PKCE