Add postgress docker compose examples + Flyway Modularity Support (#2089)
* added postgress docker compose examples * move mysql flyway into server (remove from hawkbit-repository-jpa-flyway) * in starters is added posgress and sqlserver flyway support - see [Flyway Modularity](https://github.com/flyway/flyway/issues/3780) _release_notes_ Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -14,7 +14,7 @@ services:
|
||||
# Postgres service
|
||||
# ---------------------
|
||||
postgres:
|
||||
image: "postgres:16.1"
|
||||
image: "postgres:16.5"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
deploy:
|
||||
@@ -24,6 +24,10 @@ services:
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "admin"
|
||||
POSTGRES_DB: "hawkbit"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
|
||||
interval: 20s
|
||||
retries: 10
|
||||
|
||||
# ---------------------
|
||||
# RabbitMQ service
|
||||
|
||||
@@ -22,10 +22,10 @@ services:
|
||||
environment:
|
||||
- 'PROFILES=mysql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8081"
|
||||
@@ -41,11 +41,12 @@ services:
|
||||
hawkbit-dmf:
|
||||
image: "hawkbit/hawkbit-dmf-server:latest-mysql"
|
||||
environment:
|
||||
- 'PROFILES=mysql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
restart: always
|
||||
depends_on:
|
||||
mysql:
|
||||
@@ -59,11 +60,12 @@ services:
|
||||
hawkbit-mgmt:
|
||||
image: "hawkbit/hawkbit-mgmt-server:latest-mysql"
|
||||
environment:
|
||||
- 'PROFILES=mysql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
volumes:
|
||||
- artifactrepo:/artifactrepo
|
||||
restart: always
|
||||
@@ -75,31 +77,6 @@ services:
|
||||
labels:
|
||||
NAME: "hawkbit-mgmt"
|
||||
|
||||
|
||||
# # ---------------------
|
||||
# # HawkBit Vaadin 8 based UI (NOT SUPPORTED!)
|
||||
# # Outdated and not supported - may not work or lead to problems.
|
||||
# # NOT Recommended - use it only AT YOUR RISK!
|
||||
# # ---------------------
|
||||
# hawkbit-vv8ui:
|
||||
# image: "hawkbit/hawkbit-vv8-ui:latest-mysql"
|
||||
# environment:
|
||||
# - 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit'
|
||||
# - 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
# - 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
# - 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
# - 'SPRING_DATASOURCE_USERNAME=root'
|
||||
# volumes:
|
||||
# - artifactrepo:/artifactrepo
|
||||
# restart: always
|
||||
# ports:
|
||||
# - "8082:8082"
|
||||
# depends_on:
|
||||
# mysql:
|
||||
# condition: service_healthy
|
||||
# labels:
|
||||
# NAME: "hawkbit-vv8-ui"
|
||||
|
||||
volumes:
|
||||
artifactrepo:
|
||||
driver: local
|
||||
|
||||
85
docker/docker-compose-micro-services-postgres.yml
Normal file
85
docker/docker-compose-micro-services-postgres.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
version: '3.7'
|
||||
|
||||
include:
|
||||
- docker-compose-deps-postgres.yml
|
||||
|
||||
services:
|
||||
|
||||
# ---------------------
|
||||
# HawkBit DDI
|
||||
# ---------------------
|
||||
hawkbit-ddi:
|
||||
image: "hawkbit/hawkbit-ddi-server:latest"
|
||||
environment:
|
||||
- 'PROFILES=postgresql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=postgres'
|
||||
- 'SPRING_DATASOURCE_PASSWORD=admin'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8081"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
labels:
|
||||
NAME: "hawkbit-ddi"
|
||||
|
||||
# ---------------------
|
||||
# HawkBit DMF
|
||||
# ---------------------
|
||||
hawkbit-dmf:
|
||||
image: "hawkbit/hawkbit-dmf-server:latest"
|
||||
environment:
|
||||
- 'PROFILES=postgresql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=postgres'
|
||||
- 'SPRING_DATASOURCE_PASSWORD=admin'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
restart: always
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
labels:
|
||||
NAME: "hawkbit-dmf"
|
||||
|
||||
# ---------------------
|
||||
# HawkBit MGMT
|
||||
# ---------------------
|
||||
hawkbit-mgmt:
|
||||
image: "hawkbit/hawkbit-mgmt-server:latest"
|
||||
environment:
|
||||
- 'PROFILES=postgresql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=postgres'
|
||||
- 'SPRING_DATASOURCE_PASSWORD=admin'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
volumes:
|
||||
- artifactrepo:/artifactrepo
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
labels:
|
||||
NAME: "hawkbit-mgmt"
|
||||
|
||||
volumes:
|
||||
artifactrepo:
|
||||
driver: local
|
||||
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
version: '3.7'
|
||||
|
||||
include:
|
||||
- docker-compose-micro-services-postgres.yml
|
||||
|
||||
services:
|
||||
|
||||
# ---------------------
|
||||
# HawkBit Simple UI
|
||||
# ---------------------
|
||||
hawkbit-simple-ui:
|
||||
image: "hawkbit/hawkbit-simple-ui:latest"
|
||||
environment:
|
||||
- 'SPRING_APPLICATION_JSON={"hawkbit.server.mgmtUrl": "http://hawkbit-mgmt:8080"}'
|
||||
restart: always
|
||||
ports:
|
||||
- 8088:8088
|
||||
labels:
|
||||
NAME: "hawkbit-simple-ui"
|
||||
|
||||
volumes:
|
||||
artifactrepo:
|
||||
driver: local
|
||||
@@ -22,10 +22,10 @@ services:
|
||||
environment:
|
||||
- 'PROFILES=mysql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
- 'SPRING_DATASOURCE_USERNAME=root'
|
||||
volumes:
|
||||
- artifactrepo:/artifactrepo
|
||||
restart: always
|
||||
|
||||
43
docker/docker-compose-monolith-postgres.yml
Normal file
43
docker/docker-compose-monolith-postgres.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
version: '3'
|
||||
|
||||
include:
|
||||
- docker-compose-deps-postgres.yml
|
||||
|
||||
services:
|
||||
|
||||
# ---------------------
|
||||
# HawkBit service
|
||||
# ---------------------
|
||||
hawkbit:
|
||||
image: "hawkbit/hawkbit-update-server:latest"
|
||||
environment:
|
||||
- 'PROFILES=postgresql'
|
||||
- 'SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/hawkbit'
|
||||
- 'SPRING_DATASOURCE_USERNAME=postgres'
|
||||
- 'SPRING_DATASOURCE_PASSWORD=admin'
|
||||
- 'SPRING_RABBITMQ_HOST=rabbitmq'
|
||||
- 'SPRING_RABBITMQ_USERNAME=guest'
|
||||
- 'SPRING_RABBITMQ_PASSWORD=guest'
|
||||
volumes:
|
||||
- artifactrepo:/artifactrepo
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
labels:
|
||||
NAME: "hawkbit"
|
||||
|
||||
volumes:
|
||||
artifactrepo:
|
||||
driver: local
|
||||
32
docker/docker-compose-monolith-with-simple-ui-postgres.yml
Normal file
32
docker/docker-compose-monolith-with-simple-ui-postgres.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
version: '3'
|
||||
|
||||
include:
|
||||
- docker-compose-monolith-postgres.yml
|
||||
|
||||
services:
|
||||
|
||||
# ---------------------
|
||||
# HawkBit Simple UI service
|
||||
# ---------------------
|
||||
hawkbit-simple-ui:
|
||||
image: "hawkbit/hawkbit-simple-ui:latest"
|
||||
environment:
|
||||
- 'SPRING_APPLICATION_JSON={"hawkbit.server.mgmtUrl": "http://hawkbit:8080"}'
|
||||
restart: always
|
||||
ports:
|
||||
- 8088:8088
|
||||
labels:
|
||||
NAME: "hawkbit-simple-ui"
|
||||
|
||||
volumes:
|
||||
artifactrepo:
|
||||
driver: local
|
||||
@@ -42,14 +42,29 @@
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- h2 flyway is supported by the flyway-core dependency -->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-sqlserver</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
</dependency>
|
||||
<!-- Database END -->
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
|
||||
@@ -42,14 +42,29 @@
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- h2 flyway is supported by the flyway-core dependency -->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-sqlserver</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
</dependency>
|
||||
<!-- Database END -->
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
|
||||
@@ -42,14 +42,29 @@
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- h2 flyway is supported by the flyway-core dependency -->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-sqlserver</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
</dependency>
|
||||
<!-- Database END -->
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
|
||||
@@ -32,18 +32,34 @@
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Database -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- h2 flyway is supported by the flyway-core dependency -->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-sqlserver</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
</dependency>
|
||||
<!-- Database END -->
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
|
||||
@@ -35,9 +35,5 @@
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Reference in New Issue
Block a user