Solidtime Ansible role
https://www.solidtime.io/
- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
Solidtime
Deploys a Solidtime instance via Docker Compose with PostgreSQL and Gotenberg, routed through Traefik as a reverse proxy.
Requirements
- Docker
community.dockerAnsible collection
Variables
| Variable | Default | Description |
|---|---|---|
solidtime_instance |
solidtime |
Unique instance name. Used as Compose project name and container name prefix. Change when running multiple instances on the same host. |
solidtime_version |
latest |
Solidtime image tag. Pin to a specific version in production. |
solidtime_data_path |
/data/solidtime |
Host path for persistent data (database, storage, logs). |
solidtime_docker_path |
/docker/solidtime |
Host path for the compose.yml file. |
solidtime_domain |
~ |
Public domain Solidtime runs on (no protocol prefix). Required. |
solidtime_db_user |
solidtime |
PostgreSQL role name. |
solidtime_db |
solidtime |
PostgreSQL database name. |
solidtime_db_password |
~ |
PostgreSQL user password. Required. Generate with openssl rand -hex 32. |
solidtime_key |
~ |
Laravel application encryption key. Required. See Key Generation. |
solidtime_pk |
~ |
Passport OAuth private key (PEM). Required. See Key Generation. |
solidtime_public |
~ |
Passport OAuth public key (PEM). Required. See Key Generation. |
solidtime_admins |
[] |
List of super-admin email addresses. |
solidtime_registration_enabled |
true |
When false, disables new user self-registration. |
solidtime_mail_conf |
~ |
SMTP mail configuration dict. See Mail. |
solidtime_uninstall |
false |
Stops and removes containers and the compose directory. |
solidtime_purge |
false |
Also removes the data directory. Requires solidtime_uninstall: true. Irreversible. |
Key Generation
All three crypto keys must be generated before the first deploy:
docker run --rm solidtime/solidtime:latest php artisan self-host:generate-keys
Copy the output values into your inventory:
solidtime_key: "base64:..."
solidtime_pk: |
-----BEGIN RSA PRIVATE KEY-----
...
solidtime_public: |
-----BEGIN PUBLIC KEY-----
...
Usage
Minimal setup:
solidtime_domain: "time.example.com"
solidtime_db_password: "{{ vault_solidtime_db_password }}"
solidtime_key: "{{ vault_solidtime_key }}"
solidtime_pk: "{{ vault_solidtime_pk }}"
solidtime_public: "{{ vault_solidtime_public }}"
With mail and restricted registration:
solidtime_domain: "time.example.com"
solidtime_db_password: "{{ vault_solidtime_db_password }}"
solidtime_key: "{{ vault_solidtime_key }}"
solidtime_pk: "{{ vault_solidtime_pk }}"
solidtime_public: "{{ vault_solidtime_public }}"
solidtime_registration_enabled: false
solidtime_admins:
- admin@example.com
solidtime_mail_conf:
host: smtp.example.com
username: solidtime@example.com
password: "{{ vault_solidtime_smtp_password }}"
Multiple instances on the same host:
# instance 1
solidtime_instance: solidtime_team_a
solidtime_domain: time-a.example.com
solidtime_data_path: /data/solidtime_team_a
solidtime_docker_path: /docker/solidtime_team_a
solidtime_db_password: "secret_a"
# ... keys
# instance 2
solidtime_instance: solidtime_team_b
solidtime_domain: time-b.example.com
solidtime_data_path: /data/solidtime_team_b
solidtime_docker_path: /docker/solidtime_team_b
solidtime_db_password: "secret_b"
# ... keys
solidtime_mail_conf is a dict. When unset, the mailer falls back to log (emails are written to container logs only).
| Key | Required | Default | Description |
|---|---|---|---|
host |
yes | — | SMTP server hostname. |
username |
yes | — | SMTP username. |
password |
yes | — | SMTP password. |
port |
no | 465 |
SMTP port. |
security |
no | true |
true for TLS, false to disable. |
address |
no | username |
From address. Defaults to username. |
from_name |
no | username |
Display name for outgoing mail. |
Uninstall
To stop and remove all containers and the compose directory:
solidtime_uninstall: true
To also wipe all data including the database (irreversible):
solidtime_uninstall: true
solidtime_purge: true
Notes
solidtime_domainis always required — Traefik is the only supported ingress method.solidtime_data_path/dbis owned by999:999(PostgreSQL container user, mode0700).data,logs, andappsubdirectories are owned by1000:1000.- All secret variables (
solidtime_db_password,solidtime_key,solidtime_pk,solidtime_public) should be stored in Ansible Vault.