Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 #106

Merged
merged 57 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0bc7b58
[#39] env: μŠ€ν”„λ§ 초기 ν”„λ‘œμ νŠΈ 생성
rdd9223 Oct 15, 2023
25d1709
[#39] env: μŠ€ν”„λ§ μ΅œμ‹ λ²„μ „μœΌλ‘œ 라이브러리 μ—…λ°μ΄νŠΈ
rdd9223 Oct 21, 2023
452da7b
[#39] docs: μŠ€ν”„λ§ swagger 라이브러리 적용
rdd9223 Oct 21, 2023
f853d46
[#39] Spring-ν—¬μŠ€μ²΄ν¬ API κ΅¬ν˜„
rdd9223 Nov 4, 2023
30cce76
[#39] Spring-Dockerfile μ„€μ •
rdd9223 Nov 6, 2023
e80cd13
[#39] Nestjs - 라이브러리 쒅속 ν™˜κ²½ λ³€κ²½ 및 μ—…λ°μ΄νŠΈ
rdd9223 Nov 11, 2023
d0d3a1e
[#39] Spring - Nestjs health check response λ³€κ²½
rdd9223 Nov 11, 2023
6429440
[#39] Docker compose 파일 생성
rdd9223 Nov 11, 2023
aac163c
[#86] spring μ„œλ²„ ν™˜κ²½ μ„ΈνŒ…
yeseul106 Nov 28, 2023
4ed4766
[#86] DTO 및 컨트둀러 클래슀 μƒμ„±μž μ „λž΅ λ¦¬νŒ©ν† λ§
yeseul106 Nov 28, 2023
8553351
[#86] spring data jpa κ΄€λ ¨ μ˜μ‘΄μ„± μΆ”κ°€
yeseul106 Dec 1, 2023
c8f11ea
[#86] Http Status code에 λ”°λ₯Έ μ˜ˆμ™Έ 처리 μΆ”κ°€
yeseul106 Dec 1, 2023
da96bcc
[#86] 곡톡 response 객체 μΆ”κ°€
yeseul106 Dec 1, 2023
e87f877
[#86] JpaAuditing κ΄€λ ¨ config 파일 μΆ”κ°€
yeseul106 Dec 1, 2023
25f5c18
[#86] ν˜„μž¬ DB 컬렴λͺ…에 맞게 PhysicalNamingStrategyStandardImpl둜 물리적 λͺ…λͺ… μ „λž΅ λ°”κΎΈκΈ°
yeseul106 Dec 1, 2023
9be75f6
[#86] κΈ°μ‘΄ nest.jsλ₯Ό κΈ°μ€€μœΌλ‘œ μ—”ν‹°ν‹° λ§ˆμ΄κ·Έλ ˆμ΄μ…˜
yeseul106 Dec 1, 2023
e285d2d
[#86] λŒ€λž΅μ μΈ apiResponse 객체 ꡬ쑰 μˆ˜μ •
yeseul106 Dec 1, 2023
e6765fa
[#86] λΆˆν•„μš”ν•œ μ—”ν„° 곡백 제거
yeseul106 Dec 1, 2023
2e6ecc0
[#88] env: [Spring] νŒ¨ν‚€μ§€κ°„ import 문제 ν•΄κ²°
rdd9223 Dec 2, 2023
f3ccebd
add: pull request template μΆ”κ°€
yeseul106 Dec 2, 2023
3929450
add: bug issue template μΆ”κ°€
yeseul106 Dec 2, 2023
c8542ad
add: feature issue template μΆ”κ°€
yeseul106 Dec 2, 2023
7d57c76
[#91] feat: [λͺ¨μž„] 전체 λͺ¨μž„μ˜ κ²Œμ‹œκΈ€μ„ μ‘°νšŒν•˜λ„λ‘ λ³€κ²½ 및 λͺ¨μž„ 정보도 ν•¨κ»˜ μΆ”κ°€
rdd9223 Dec 2, 2023
2d13548
[#89] chore: λΆˆν•„μš”ν•œ importλ¬Έ μ‚­μ œ
yeseul106 Dec 2, 2023
e6ea2f7
[#89] config: hibernate-types μ‚¬μš©μ„ μœ„ν•΄ μ˜μ‘΄μ„± μΆ”κ°€
yeseul106 Dec 4, 2023
2124b14
[#89] fix: hibernate 6에 λ§žμΆ°μ„œ PhysicalNamingStrategyStandardImpl 넀이밍 μ „λž΅β€¦
yeseul106 Dec 4, 2023
a3e5d19
[#89] rename: 곡톡 응닡 λͺ¨λΈ 클래슀λͺ… μˆ˜μ •
yeseul106 Dec 4, 2023
627e74a
[#89] feat: λ‚΄κ°€ μ†ν•œ λͺ¨μž„ 리슀트 쑰회 api κ΅¬ν˜„
yeseul106 Dec 4, 2023
24593af
[#89] add: Spring Security μ„ΈνŒ…
yeseul106 Dec 5, 2023
e7156ce
[#89] add: Swagger κ΄€λ ¨ config μΆ”κ°€
yeseul106 Dec 5, 2023
47f5577
[#89] fix: securityλ₯Ό λΆ™μž„μ— 따라 jwt 토큰 μœ μ €μ˜ 데이터λ₯Ό 내렀주도둝 μˆ˜μ •
yeseul106 Dec 5, 2023
7f293a5
[#89] fix: λΆˆν•„μš”ν•œ μ½”λ“œ 제거 및 jwt κ΄€λ ¨ μ„ΈνŒ… 정리
yeseul106 Dec 6, 2023
0166fe4
[#96] fix: λͺ¨μž„ 이미지 ν•„λ“œλͺ… 톡일
yeseul106 Dec 6, 2023
76be2b2
[#95] add : λͺ¨μž„μ˜ 정보쀑 λͺ¨μž„ μ†Œκ°œ 데이터 ν•„λ“œ μΆ”κ°€
yeseul106 Dec 8, 2023
3d58b21
[#99] fix: CORS κ΄€λ ¨ config μΆ”κ°€
yeseul106 Dec 9, 2023
6b04492
[#101] fix: swaggerμ—μ„œ Authorize 정상 μž‘λ™ν•˜λ„λ‘ μˆ˜μ •
yeseul106 Dec 9, 2023
93a82a2
[#101] fix: deprecated된 security cors μ„€μ • μ½”λ“œ μˆ˜μ •
yeseul106 Dec 9, 2023
1af5a91
[#101] add: cors allow origin dev ν™˜κ²½ url μΆ”κ°€
yeseul106 Dec 9, 2023
52a3f56
[#101] add: cors allow origin dev ν™˜κ²½ url μΆ”κ°€
yeseul106 Dec 9, 2023
c9fd089
[#94] fix: docker-compose λΉŒλ“œμ‹œ datasource error μ‚­μ œ
rdd9223 Dec 6, 2023
72718f5
[#94] env: traefik 뢙이기
rdd9223 Dec 6, 2023
4c7dfb4
[#94] env: spring port λ³€κ²½
rdd9223 Dec 9, 2023
4c3429a
[#94] env: caddy 적용
rdd9223 Dec 9, 2023
f86b377
[#94] docs: spring swagger μš”μ²­μ‹œ https둜 μš”μ²­ν•˜κ²Œ λ³€κ²½
rdd9223 Dec 9, 2023
c004640
[#94] env: devν™˜κ²½ 도메인 적용
rdd9223 Dec 9, 2023
aea2931
[#94] env: nestjs λΉŒλ“œμ€‘ λ©”λͺ¨λ¦¬ λˆ„μˆ˜λ‘œ μΈν•œ μž„μ‹œμ‘°μΉ˜
rdd9223 Dec 9, 2023
170cda7
[#94] env: nestjs λΉŒλ“œμ€‘ λ©”λͺ¨λ¦¬ λˆ„μˆ˜λ‘œ μΈν•œ μž„μ‹œμ‘°μΉ˜2
rdd9223 Dec 9, 2023
4142e53
[#94] env: nestjs λΉŒλ“œμ€‘ λ©”λͺ¨λ¦¬ λˆ„μˆ˜λ‘œ μΈν•œ μž„μ‹œμ‘°μΉ˜3
rdd9223 Dec 9, 2023
cd13271
[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ μ»¨ν…Œμ΄λ„ˆ 포트 μž„μ‹œ 개방
rdd9223 Dec 9, 2023
b43858a
[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ swagger url μž„μ‹œ λ³€κ²½
rdd9223 Dec 9, 2023
7d66e84
Revert "[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ μ»¨ν…Œμ΄λ„ˆ 포트 μž„μ‹œ 개방"
rdd9223 Dec 9, 2023
bc45cb7
Revert "[#94] env: devν™˜κ²½ 배포λ₯Ό μœ„ν•œ swagger url μž„μ‹œ λ³€κ²½"
rdd9223 Dec 9, 2023
4bedb0d
[#94] env: vscode 디렉토리 git ignore μΆ”κ°€
rdd9223 Dec 9, 2023
1fd0f5b
[#94] env: ν™˜κ²½λ³„ docker-compose 파일 생성
rdd9223 Dec 9, 2023
7c73a06
[#94] env: λ‘œκΉ… μ£ΌκΈ° μΆ”κ°€
rdd9223 Dec 9, 2023
95fc039
[#94] docs: 배포 κ΄€λ ¨ README λ‚΄μš© μ—…λ°μ΄νŠΈ
rdd9223 Dec 9, 2023
dcd478f
[#104] v1.0.0
rdd9223 Dec 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Bug report
about: 버그 이슈 ν…œν”Œλ¦Ώ
title: ''
labels: ''
assignees: ''

---

## πŸ“œ Bug Description
<!-- 버그에 λŒ€ν•΄ μ„€λͺ…ν•΄μ£Όμ„Έμš”. -->

## 🐞 Bug Condition
<!-- 버그 λ°œμƒ 쑰건을 μ•Œλ €μ£Όμ„Έμš”. -->

## πŸ“· Bug Screenshot
<!-- 버그 μŠ€ν¬λ¦°μƒ·, λ™μ˜μƒμ„ μ²¨λΆ€ν•΄μ£Όμ„Έμš”. -->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Request
about: κΈ°λŠ₯ 개발 이슈 ν…œν”Œλ¦Ώ
title: ''
labels: ''
assignees: ''

---

## πŸš€ About Issue πŸš€
<!-- μ΄μŠˆμ— λŒ€ν•œ λ‚΄μš©μ„ μ„€λͺ…ν•΄μ£Όμ„Έμš”. -->


## βœ… Todo
<!-- ν•΄μ•Ό ν•  일듀을 μ μ–΄μ£Όμ„Έμš”. -->
- [ ] todo !
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## πŸ‘©β€πŸ’» Contents
<!-- μž‘μ—… λ‚΄μš©μ„ μ μ–΄μ£Όμ„Έμš” -->

## πŸ“ Review Note
<!-- PRκ³Όμ •μ—μ„œ λ“  μƒκ°μ΄λ‚˜ κ°œμ„ ν•  λ‚΄μš©μ΄ μžˆλ‹€λ©΄ μ μ–΄μ£Όμ„Έμš”. -->

## πŸ“£ Related Issue
<!-- κ΄€λ ¨ 이슈λ₯Ό μ μ–΄μ£Όμ„Έμš”. -->
- closed #
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"configurations": [
{
"type": "java",
"name": "Spring Boot-MainApplication<main>",
"request": "launch",
"cwd": "${workspaceFolder}",
"mainClass": "org.sopt.makers.crew.main.MainApplication",
"projectName": "main",
"args": "",
"envFile": "${workspaceFolder}/.env"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
50 changes: 30 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ $ npm run test:cov
- DB GUI tool: pgAdmin4
- ORM: TypeORM
- API λ¬Έμ„œ: Swagger
- 배포: AWS EC2, PM2
- 배포: AWS EC2, Docker Compose
- 인증: JWT
- ν…ŒμŠ€νŠΈ: Jest
- μ„œλ²„ ν”„λ ˆμž„μ›Œν¬: NestJS
- μ›Ήμ„œλ²„ ν”„λ ˆμž„μ›Œν¬: Nginx
- μ–Έμ–΄: typescript
- ν…ŒμŠ€νŠΈ: Jest, Unit5
- μ„œλ²„ ν”„λ ˆμž„μ›Œν¬: NestJS, Spring
- μ›Ήμ„œλ²„ ν”„λ ˆμž„μ›Œν¬: Caddy
- μ–Έμ–΄: typescript, Java

# μ•„ν‚€ν…μ²˜

## flow

1. Nginxλ₯Ό 톡해 HTTPSλ₯Ό μ μš©ν•˜κ³ , HTTP둜 λ“€μ–΄μ˜€λŠ” μš”μ²­μ„ HTTPS둜 λ¦¬λ‹€μ΄λ ‰νŠΈν•œλ‹€.
2. HTTPS둜 λ“€μ–΄μ˜¨ μš”μ²­μ„ Nginxκ°€ λ°›μ•„μ„œ, NginxλŠ” μš”μ²­μ„ 받은 후에 ν•΄λ‹Ή μš”μ²­μ„ NodeJS μ„œλ²„λ‘œ ν”„λ‘μ‹œν•œλ‹€.
3. NodeJS μ„œλ²„λŠ” μš”μ²­μ„ λ°›μ•„μ„œ, μš”μ²­μ— λ§žλŠ” Controllerλ₯Ό μ°Ύμ•„μ„œ ν•΄λ‹Ή Controllerμ—μ„œ Serviceλ₯Ό ν˜ΈμΆœν•œλ‹€.
1. Caddyλ₯Ό 톡해 HTTPSλ₯Ό μ μš©ν•˜κ³ , HTTP둜 λ“€μ–΄μ˜€λŠ” μš”μ²­μ„ HTTPS둜 λ¦¬λ‹€μ΄λ ‰νŠΈν•œλ‹€.
2. HTTPS둜 λ“€μ–΄μ˜¨ μš”μ²­μ„ Caddyκ°€ λ°›μ•„μ„œ, CaddyλŠ” μš”μ²­μ„ 받은 후에 ν•΄λ‹Ή μš”μ²­μ„ NodeJS/Spring μ„œλ²„λ‘œ λ¦¬λ²„μŠ€ν”„λ‘μ‹œν•œλ‹€.
3. NodeJS/Spring μ„œλ²„λŠ” μš”μ²­μ„ λ°›μ•„μ„œ, μš”μ²­μ— λ§žλŠ” Controllerλ₯Ό μ°Ύμ•„μ„œ ν•΄λ‹Ή Controllerμ—μ„œ Serviceλ₯Ό ν˜ΈμΆœν•œλ‹€.
4. Serviceμ—μ„œ λ‘œμ§μ„ μ²˜λ¦¬ν•œ 후에, Repositoryλ₯Ό 톡해 DB에 μ ‘κ·Όν•œλ‹€.
5. RepositoryλŠ” DB에 μ ‘κ·Όν•΄μ„œ 데이터λ₯Ό κ°€μ Έμ˜¨ 후에, Serviceμ—κ²Œ 데이터λ₯Ό μ „λ‹¬ν•œλ‹€.
6. ServiceλŠ” Repositoryλ‘œλΆ€ν„° 받은 데이터λ₯Ό κ°€κ³΅ν•΄μ„œ Controllerμ—κ²Œ μ „λ‹¬ν•œλ‹€.
Expand Down Expand Up @@ -161,14 +161,19 @@ bar # μ˜ˆμ‹œ λͺ¨λ“ˆ
## ν™˜κ²½ λ³€μˆ˜

- ν™˜κ²½ λ³€μˆ˜λŠ” dev/prod ν™˜κ²½μ— 따라 λ‹€λ₯΄κ²Œ μ„€μ •λ˜μ–΄μ•Ό ν•œλ‹€.
- dev ν™˜κ²½: .dev.env
- prod ν™˜κ²½: .prod.env
- Nestjs
- dev ν™˜κ²½: .dev.env
- prod ν™˜κ²½: .prod.env
- Spring
- dev ν™˜κ²½: application-dev.yml
- prod ν™˜κ²½: application-prod.yml
- application-secret.properties: secret keyλ₯Ό κ΄€λ¦¬ν•œλ‹€.

## API λ¬Έμ„œ

- `/api-docs`둜 μ ‘μ†ν•˜λ©΄ λ³Ό 수 μžˆλ‹€.
- [Crew API Docs - Dev](https://crew.api.dev.sopt.org/api-docs)
- [Crew API Docs - Prod](https://crew.api.prod.sopt.org/api-docs)
- [Crew API Docs - Dev](https://crew.api.dev.sopt.org/docs)
- [Crew API Docs - Prod](https://crew.api.prod.sopt.org/docs)
- [Playground API Docs - Dev](https://playground.dev.sopt.org/swagger-ui/index.html)

## 인증
Expand All @@ -189,20 +194,25 @@ bar # μ˜ˆμ‹œ λͺ¨λ“ˆ
## 배포 정보

- 배포 μ„œλ²„: AWS EC2
- 배포 툴: PM2
- 배포 툴: Docker Compose

## 배포 방법

```bash
# build
# ν˜„μž¬ μ„œλ²„μ—μ„œ λΉŒλ“œλ₯Ό ν•˜λ©΄ λ©”λͺ¨λ¦¬κ°€ λΆ€μ‘±ν•΄μ„œ λΉŒλ“œκ°€ μ•ˆλ˜κΈ° λ•Œλ¬Έμ— μž„μ‹œλ°©νŽΈ μ‘°μΉ˜μ΄λ‹€. CI/CDλ₯Ό μ΄μš©ν•΄ ν•΄κ²°ν•΄μ•Ό ν•œλ‹€.
$ NODE_OPTIONS=--max-old-space-size=2048 npm run build
# Prod 배포
$ sudo docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build

# buildλ₯Ό 배포
$ pm2 restart 0
# Dev 배포
$ sudo docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

# 배포된 이후 둜그λ₯Ό ν™•μΈν•΄μ„œ μ œλŒ€λ‘œ λ°°ν¬λ˜μ—ˆλŠ”μ§€ 확인
$ pm2 log
# 배포 ν›„ 둜그 확인
$ sudo docker compose logs -f -t 10

# 배포 ν›„ μ»¨ν…Œμ΄λ„ˆ μƒνƒœ 확인
$ sudo docker compose ps -a

# 배포 ν›„ μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 이미지 μžλ™ μ‚­μ œ
$ sudo docker image prune
```

# ν˜‘μ—…
Expand Down
18 changes: 18 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "3.7"

services:
swagger:
labels:
caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org

spring:
environment:
- SPRING_PROFILES_ACTIVE=dev
labels:
caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org

nestjs:
environment:
- NODE_ENV=dev
labels:
caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org
18 changes: 18 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "3.7"

services:
swagger:
labels:
caddy: localhost

spring:
environment:
- SPRING_PROFILES_ACTIVE=dev
labels:
caddy: localhost

nestjs:
environment:
- NODE_ENV=dev
labels:
caddy: localhost
18 changes: 18 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "3.7"

services:
swagger:
labels:
caddy: localhost crew.api.prod.sopt.org www.crew.api.prod.sopt.org

spring:
environment:
- SPRING_PROFILES_ACTIVE=prod
labels:
caddy: localhost crew.api.prod.sopt.org www.crew.api.prod.sopt.org

nestjs:
environment:
- NODE_ENV=prod
labels:
caddy: localhost crew.api.prod.sopt.org www.crew.api.prod.sopt.org
119 changes: 119 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
version: "3.7"

services:
caddy:
container_name: caddy
image: lucaslorentz/caddy-docker-proxy:ci-alpine
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
restart: unless-stopped

swagger:
image: swaggerapi/swagger-ui
container_name: swagger
environment:
- URLS=
[
{url:'/api-docs/json', name:'spring'},
{url:'/api-docs-json', name:'nestjs'},
]
- BASE_URL=/docs
depends_on:
- nestjs
- spring
networks:
- caddy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
labels:
caddy.route: /docs*
caddy.route.reverse_proxy: "{{ upstreams 8080 }}"

spring:
build:
context: ./main
dockerfile: Dockerfile
container_name: spring
restart: unless-stopped
depends_on:
- nestjs
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
networks:
- caddy
labels:
# for Swagger spec
caddy.route_0: /api-docs/json
caddy.route_0.reverse_proxy: "{{ upstreams 4000 }}"
# for health check
caddy.route_1: /health
caddy.route_1.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_2: /user/v2
caddy.route_2.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_3: /user/v2/*
caddy.route_3.reverse_proxy: "{{ upstreams 4000 }}"

nestjs:
build:
context: ./server
dockerfile: Dockerfile
container_name: nestjs
restart: unless-stopped
networks:
- caddy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
labels:
# for Swagger spec
caddy.route_0: /api-docs-json
caddy.route_0.reverse_proxy: "{{ upstreams 3000 }}"
# for health check
caddy.route_1: /
caddy.route_1.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_2: /auth
caddy.route_2.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_3: /comment/v1
caddy.route_3.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_4: /comment/v1/*
caddy.route_4.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_5: /meeting
caddy.route_5.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_6: /meeting/*
caddy.route_6.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_7: /notice/v1
caddy.route_7.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_8: /notice/v1/*
caddy.route_8.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_9: /post/v1
caddy.route_9.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_10: /post/v1/*
caddy.route_10.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_11: /users
caddy.route_11.reverse_proxy: "{{ upstreams 3000 }}"
caddy.route_12: /users/*
caddy.route_12.reverse_proxy: "{{ upstreams 3000 }}"

networks:
caddy:
external: true
39 changes: 39 additions & 0 deletions main/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

application-secret.properties
10 changes: 10 additions & 0 deletions main/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM openjdk:17-jdk-slim AS build
WORKDIR /app
COPY . /app
RUN ./gradlew build

FROM openjdk:17-jdk-slim
WORKDIR /app
COPY --from=build /app/build/libs/*.jar app.jar

ENTRYPOINT ["java","-jar","/app/app.jar"]
Loading
Loading