2018-09-21 14:12:47 +02:00
hawkBit Docker
===
2025-09-02 16:08:14 +03:00
## Overview
This folder contains example Docker build and Docker Compose files to build and start the hawkBit as monolith or as microservices.
2018-09-21 14:12:47 +02:00
2025-09-02 16:08:14 +03:00
## Build
You could build the hawkbit Docker images following the [README.md ](build/README.md ) instructions.
## Start
You can start hawkbit as a Docker Container (only monolith) or with Docker Compose
#### A: Docker Container (only as monolith)
_Note: You need to have Docker installed on your machine._
Start the hawkBit Update Server (monolith) as a single container (with embedded H2, if you configure a different database, e.g. MySQL or PostgreSQL, you should start it separately):
2018-09-21 14:12:47 +02:00
```bash
$ docker run -d -p 8080:8080 hawkbit/hawkbit-update-server:latest
```
2025-09-02 16:08:14 +03:00
### B: Docker Compose
_Note: You need to have Docker Compose installed on your machine._
Start the hawkBit Update Server (monolith) together with an MySQL and RabbitMQ instance as containers (Requires Docker Compose to be installed)
2018-09-21 14:12:47 +02:00
```bash
2025-04-24 16:40:55 +03:00
$ docker compose -f mysql/docker-compose-monolith-mysql.yml up
2018-09-21 14:12:47 +02:00
```
2025-09-02 16:08:14 +03:00
With the upper command CTRL+C shuts down all services. Add '-d' at the end to start all into detached mode:
2018-09-21 14:12:47 +02:00
```bash
2025-04-24 16:40:55 +03:00
$ docker compose -f mysql/docker-compose-monolith-mysql.yml up -d
2024-11-20 16:22:48 +02:00
```
Then stop all services with:
```bash
2025-04-24 16:40:55 +03:00
$ docker compose -f mysql/docker-compose-monolith-mysql.yml down
2018-09-21 14:12:47 +02:00
```
2025-09-02 16:08:14 +03:00
You could, also start it in different flavours, with UI or in microservices mode (see Docker Compose files in [mysql ](./mysql ) and [postgres ](./postgres ) folders). For instance to start with PostgreSQL, with RabbitMQ, in microservices mode and with UI you could use:
```bash
$ docker compose -f postgres/docker-compose-micro-services-with-simple-ui-postgres.yml up
```
2019-10-28 15:46:56 +01:00
2025-09-02 16:08:14 +03:00
### Access
| Service / Container | URL | Login | A | B |
|-----------------------|------------------------|-------------|----------|----------|
| hawkBit Update Server | [http://localhost:8080/ ](http://localhost:8080/ ) | admin:admin | ✓ ; | ✓ ; |
| MySQL | localhost:3306/hawkbit | root | | ✓ ; |
| RabbitMQ | [http://localhost:15672 ](http://localhost:15672 ) | guest:guest | | ✓ ; |
### Configuration
You can override _ application.properties _ by setting an environment variable _SPRING_APPLICATION_JSON_ to the hawkbit container, e.g.:
2024-11-05 11:38:12 +02:00
2024-11-21 12:45:42 +02:00
```yaml
2019-10-28 15:46:56 +01:00
hawkbit:
2024-11-20 16:22:48 +02:00
image: "hawkbit/hawkbit-update-server:latest"
2019-10-28 15:46:56 +01:00
environment:
SPRING_APPLICATION_JSON: '{
2023-03-28 07:16:25 +02:00
"spring.datasource.url": "jdbc:mariadb://mysql:3306/hawkbit",
2019-10-28 15:46:56 +01:00
"spring.rabbitmq.host": "rabbitmq",
"spring.rabbitmq.username": "guest",
"spring.rabbitmq.password": "guest",
2024-11-21 12:45:42 +02:00
# should remove default admin/admin user
"hawkbit.security.user.admin.tenant": "#{null}",
"hawkbit.security.user.admin.password": "#{null}",
"hawkbit.security.user.admin.roles": "#{null}",
# should add hawkbit/isAwesome! user
2024-11-21 09:38:14 +02:00
"hawkbit.security.user.hawkbit.tenant": "DEFAULT",
"hawkbit.security.user.hawkbit.password": "{noop}isAwesome!",
"hawkbit.security.user.hawkbit.roles": "TENANT_ADMIN"
2019-10-28 15:46:56 +01:00
}'
2025-09-02 16:08:14 +03:00
```