Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jun-labs/springboot-docker-compose-support
๐ SpringBoot Docker Compose support.
https://github.com/jun-labs/springboot-docker-compose-support
docker docker-compose nosql rdbms springboot
Last synced: 8 days ago
JSON representation
๐ SpringBoot Docker Compose support.
- Host: GitHub
- URL: https://github.com/jun-labs/springboot-docker-compose-support
- Owner: jun-labs
- Created: 2024-03-12T15:36:32.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-19T08:33:49.000Z (11 months ago)
- Last Synced: 2024-11-19T21:37:57.931Z (2 months ago)
- Topics: docker, docker-compose, nosql, rdbms, springboot
- Language: Kotlin
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpringBoot Docker-Compose
Docker Compose support in Spring Boot 3.1 builds
on top of the ConnectionDetails abstraction,
which weโve featured in a
separate blog post.[![Release](https://img.shields.io/badge/-%F0%9F%93%9A%20Document-green)](https://spring.io/blog/2023/06/21/docker-compose-support-in-spring-boot-3-1)
## 1. Getting Started
ํ๋ก์ ํธ ์คํ ์ .env์ .yml ํ์ผ์ ์ค์ ํด์ฃผ์ธ์.
> Java17 / Kotlin1.7 ๋ฒ์ ์ด์์ JDK๋ฅผ ์ค์นํด์ผ ํฉ๋๋ค.
## Run Application
````text
$ ./gradlew bootRun
````
## Run Test
````text
$ ./gradlew test
````
## Run Build
````text
$ ./gradlew build
````
## 2. ๋์ปค ์ค์
.env ํ์ผ ์์.
```text
MYSQL_ROOT_PASSWORD=ROOT_PASSWORD
MYSQL_DATABASE=DATABASE
MYSQL_USER=USER
MYSQL_PASSWORD=PASSWORD
TZ=Asia/Seoul
```
.env ํ์ผ์ MYSQL_DATABASE ๊ฐ์ .yml์ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์คํค๋ง์ ์ผ์นํด์ผ ํฉ๋๋ค.
```yaml
spring:
......
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
# .env ํ์ผ์ MYSQL_DATABASE์ ์ผ์น
url: jdbc:mysql://localhost:3306/${MYSQL_DATABASE}
username: USER
password: PASSWORD
max-lifetime: 30000
hikari:
maximum-pool-size: 500
```