Deploy Thunder with Docker
This guide walks you through deploying Thunder using Docker. You can run Thunder as a single container for development or pair it with an external PostgreSQL database for production use.
Prerequisites
Before you begin, ensure the following tools are installed:
| Tool | Minimum Version | Installation Guide | Version Check |
|---|---|---|---|
| Docker | 20.10 | Install Docker | docker --version |
| Docker Compose | 2.0 | Install Docker Compose | docker compose version |
Verify your installation:
docker --version
docker compose version
docker run hello-world
Thunder listens on port 8090 by default. Ensure that port is available on your host.
Run Thunder with Docker
Step 1: Pull the Image
docker pull ghcr.io/asgardeo/thunder:latest
Step 2: Set Up the Server
Run the one-time setup script before starting Thunder for the first time. The setup initializes the configuration and database:
docker run -it --rm \
ghcr.io/asgardeo/thunder:latest \
./setup.sh
The container exits after setup completes. If you are using SQLite as the database, mount a volume to persist the database file so the setup data is available when you start the server.
Step 3: Start the Server
docker run --rm \
-p 8090:8090 \
ghcr.io/asgardeo/thunder:latest
Thunder is now running at https://localhost:8090.
Customize the Configuration
To override the default server configuration, mount a custom deployment.yaml file. Create a deployment.yaml based on the default configuration and pass it to the container:
docker run --rm \
-p 8090:8090 \
-v $(pwd)/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml \
ghcr.io/asgardeo/thunder:latest
To also use custom TLS certificates, mount them alongside the configuration:
docker run --rm \
-p 8090:8090 \
-v $(pwd)/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml \
-v $(pwd)/certs/server.cert:/opt/thunder/repository/resources/security/server.cert \
-v $(pwd)/certs/server.key:/opt/thunder/repository/resources/security/server.key \
ghcr.io/asgardeo/thunder:latest
Access Thunder
Once the container is running, access Thunder at the following endpoints:
| Endpoint | URL |
|---|---|
| Application | https://localhost:8090 |
| Sign-in / Register | https://localhost:8090/signin |
| Thunder Console | https://localhost:8090/console |
Database Setup
Embedded SQLite (Default)
Thunder uses SQLite by default. No additional setup is required for development or local testing.
External PostgreSQL
For production deployments, use an external PostgreSQL database. Thunder ships with a Docker Compose file for running a local PostgreSQL instance.
-
Navigate to the
install/local-developmentdirectory:cd install/local-development -
Start PostgreSQL in the background:
docker compose up -d -
View PostgreSQL logs:
docker compose logs -f -
Stop PostgreSQL:
docker compose downTo stop PostgreSQL and delete all data:
docker compose down -v
Next Steps
- Deploy Thunder on Kubernetes — Deploy Thunder to a Kubernetes cluster using Helm.
- Deploy Thunder on OpenChoreo — Deploy Thunder on the OpenChoreo platform.