-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from bryopsida/add-liquibase
Database migrations
- Loading branch information
Showing
23 changed files
with
413 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,5 +267,9 @@ jobs: | |
path: chart/ | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Deploy a database | ||
run: | | ||
helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/ | ||
helm --namespace test install postgres groundhog2k/postgres | ||
- name: Install | ||
run: ct install --charts chart/ --namespace test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
build | ||
bin | ||
.gradle | ||
.DS_Store | ||
.DS_Store | ||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Spring Boot Starter K8S Template | ||
|
||
## What is this? | ||
|
||
This is a template repository for kicking off a cloud native spring boot java microservice. | ||
|
||
## What makes this cloud native? | ||
|
||
It's solely focused on deployment to kubernetes, the primary build artifacts of the repository are a OCI image and a helm chart. The helm chart is dynamically generated using jkube and it's associated gradle plugin. | ||
|
||
## What opinions have applied to this? | ||
|
||
- Gradle | ||
- Spring Boot | ||
- Spring Flux | ||
- Spring R2DBC (Reactive Database) | ||
- Netty | ||
- JKube (Kubernetes Deployment and Development Tools) | ||
- Liquibase | ||
|
||
## How do I run locally? | ||
|
||
Use `make run`. | ||
|
||
## How do I run locally outside of a container? | ||
|
||
If you wish to run directly in your IDE: | ||
|
||
1. Run `docker-compose up -d` to start the postgres database server. | ||
2. Run `./gradlew update bootRun`, `update` runs the migrations and `bootRun` launches the spring boot application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3" | ||
services: | ||
database: | ||
image: "postgres:latest" | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=springboottemplate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
pluginManagement { | ||
repositories { | ||
maven { url "https://plugins.gradle.org/m2" } | ||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } | ||
} | ||
repositories { | ||
maven { url "https://plugins.gradle.org/m2" } | ||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } | ||
} | ||
} | ||
rootProject.name = 'spring-boot-starter-k8s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/main/java/io/github/springboottemplate/config/DbConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
/* (C) 2023 */ | ||
package io.github.springboottemplate.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class DbConfig {} |
7 changes: 7 additions & 0 deletions
7
src/main/java/io/github/springboottemplate/config/SecurityConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* (C) 2023 */ | ||
package io.github.springboottemplate.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SecurityConfig {} |
7 changes: 7 additions & 0 deletions
7
src/main/java/io/github/springboottemplate/config/SwaggerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* (C) 2023 */ | ||
package io.github.springboottemplate.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SwaggerConfig {} |
Oops, something went wrong.