Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f99bc55
์˜ˆ์•ฝ ์ƒํƒœ ๋ฐฉ๋ฌธ ์™„๋ฃŒ ์ถ”๊ฐ€ ๋ฐ ์˜ˆ์•ฝ ์ƒํƒœ ๋ณ€๊ฒฝ api ๊ตฌํ˜„
silkair Apr 27, 2026
4e3f3d2
api ์—ฐ๋™ ์ˆ˜์ •
silkair Apr 27, 2026
55cfd74
hotfix : review ์กฐํšŒ reviewId ์‘๋‹ต ์ถ”๊ฐ€
silkair Apr 27, 2026
fe7b31f
fix : ๋‚ด ๋นˆ์ž๋ฆฌ ์•Œ๋ฆผ ์กฐํšŒ ๋งค์žฅ id ์ถ”๊ฐ€ (๋นˆ์ž๋ฆฌ ์•Œ๋ฆผ api ์—ฐ๋™ ๊ณผ์ •์—์„œ ๋งค์žฅ ์กฐํšŒ ์—ฐ๋™)
silkair Apr 27, 2026
83a89ee
Feat : ์˜ˆ์•ฝ ์ƒํƒœ ๋ฐฉ๋ฌธ ์™„๋ฃŒ ์ถ”๊ฐ€ ๋ฐ ์˜ˆ์•ฝ ์ƒํƒœ ๋ณ€๊ฒฝ api ๊ตฌํ˜„, ๋‚ด ๋นˆ์ž๋ฆฌ ์•Œ๋ฆผ ์กฐํšŒ ๋งค์žฅ id ์ถ”๊ฐ€
silkair Apr 27, 2026
7b985c9
Refactor: ๋ฉ”๋‰ด ์ด๋ฏธ์ง€ ๋“ฑ๋ก ์ˆ˜์ •
jaebeom79 Apr 28, 2026
2be1364
feat : ๋นˆ์ž๋ฆฌ ์•Œ๋ฆผ ์ด๋ฒครฌย•: ๋ฆฌ์Šค๋„ˆ๋กœ ๊ตฌํ˜„(๋™๊ธฐ) ๋ฐ ๊ด€๋ จ vacancy ๋กœ์ง ์ˆ˜์ •
silkair Apr 28, 2026
3279e38
Refactor: ๋งค์žฅ ํ‰์  ๊ณ„์‚ฐ ๋ฐ ์ •๋ ฌ ๋กœ์ง ์ˆ˜์ •
jaebeom79 Apr 28, 2026
88af380
Refactor: ์˜ˆ์•ฝํŽ˜์ด์ง€ ๋งค์žฅ ์นดํ…Œ๊ณ ๋ฆฌ ์ถ”๊ฐ€
jaebeom79 Apr 28, 2026
53a2f2d
feat : ๋นˆ์ž๋ฆฌ ์ƒ์„ฑ ์‹œ ์•Œ๋ฆผ ๊ตฌํ˜„
silkair Apr 28, 2026
1e1bef1
๋นˆ์ž๋ฆฌ ์•Œ๋ฆผ ์กฐํšŒ, ์ฝ์Œ์ฒ˜๋ฆฌ, ์‚ญ์ œ ๊ตฌํ˜„
silkair Apr 29, 2026
a094224
feat : ๋นˆ์ž๋ฆฌ ์•Œ๋ฆผ ๋น„๋™๊ธฐ ๋ฐ ๋™์‹œ์„ฑ ๋‚™๊ด€์  ๋ฝ ์ถ”๊ฐ€
silkair Apr 29, 2026
97142b2
feat : ์˜ˆ์•ฝ ์ทจ์†Œ, ์˜ˆ์•ฝ ํ™•์ •, ๋ฐฉ๋ฌธ ์™„๋ฃŒ ์ƒํƒœ ๋ณ€๊ฒฝ ์•Œ๋ฆผ ๊ตฌํ˜„
silkair Apr 29, 2026
7d32c45
Refactor: ๋งค์žฅ ์ „์ฒด ์กฐํšŒ ์ˆ˜์ •, ๋ฉ”๋‰ด ์ˆ˜์ • ๊ฒ€์ฆ ์ถ”๊ฐ€
jaebeom79 Apr 29, 2026
ddf27e3
Refactor: ์ง€๋„ ๋ถ๋งˆํฌ ๋ชฉ๋ฐ์ดํ„ฐ ์ œ๊ฑฐ
jaebeom79 Apr 30, 2026
1674039
feat : ์•Œ๋ฆผ ๋ชจ๋‘ ์ฝ์Œ ๊ตฌรญย–ํ˜„
silkair Apr 30, 2026
4ab098d
Feat : ์•Œ๋ฆผ api ๊ตฌํ˜„(์•Œ๋ฆผ ์ƒ์„ฑ, ์•Œ๋ฆผ ์กฐํšŒ, ์•Œ๋ฆผ ์ฝ๊ธฐ, ์•Œ๋ฆฌ ๋ชจ๋‘ ์ฝ๊ธฐ)
silkair Apr 30, 2026
5c47061
Merge remote-tracking branch 'origin/develop' into feat/#41-store-image
jaebeom79 Apr 30, 2026
ba7deec
Fix: ์˜ˆ์•ฝ ๋ณ€๊ฒฝ ์‹œ ์ทจ์†Œ ์•Œ๋ฆผ์—์„œ ๋ณ€๊ฒฝ ์•Œ๋ฆผ์œผ๋กœ ์ˆ˜์ •
jaebeom79 May 1, 2026
eb39bec
Feat: ๊ด€๋ฆฌ์ž ์ฟ ํฐ ํŽ˜์ด์ง€ ์ƒ์„ฑ
jaebeom79 May 1, 2026
92ddf63
Refactor: ๋งค์žฅ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ PostGIS๋กœ ์ˆ˜์ •
jaebeom79 May 1, 2026
c0537d1
Merge pull request #46 from catchtable-clone/feat/coupon-read
jaebeom79 May 1, 2026
f5dc5ae
feat: ์Šคํ”„๋ง ์‹œํ๋ฆฌํ‹ฐ, JWT ๊ตฌ์กฐ ์ถ”๊ฐ€
docodocod May 4, 2026
ae49d5f
feat: ๊ตฌ๊ธ€ ์†Œ์…œ ๋กœ๊ทธ์ธ(JWT) ๊ตฌํ˜„
docodocod May 4, 2026
1a6337d
refactor: X-User-Id header @AuthenticationPrincipal๋กœ ๊ต์ฒด
docodocod May 4, 2026
d175233
eat/#44-google-login
docodocod May 4, 2026
16d9e85
Refactor: ๋ฉ”๋‰ด ์—†๋Š” ๋ชจ๋“  ๋งค์žฅ์— ๋ฉ”๋‰ด ๋žœ๋ค ์ƒ์„ฑ
jaebeom79 May 4, 2026
1665bd6
feat: ์นด์นด์˜คํŽ˜์ด ๊ฒฐ์ œ ํ™•์ธ/ํ™˜๋ถˆ ๊ธฐ๋Šฅ ๊ตฌํ˜„
docodocod May 9, 2026
0fc0994
feat: ์˜ˆ์•ฝ ์ทจ์†Œ/๋ณ€๊ฒฝ ์‹œ ๊ฒฐ์ œ ์ƒํƒœ ์—ฐ๋™ ๋ฐ ์ทจ์†Œ ์ฒ˜๋ฆฌ
docodocod May 9, 2026
f7f84de
refactor: ์Šค์›จ๊ฑฐ ํ…Œ์ŠคํŠธ ์œ„ํ•œ ์„œ๋ฒ„ ์—‘์„ธ์Šค ํ† ํฐ ๋กœ๊ทธ ํ‘œ์‹œ
docodocod May 9, 2026
1d5e2a1
feat/#48-pg-test-api
docodocod May 9, 2026
df04658
Feat: github actions ์„ค์ •
jaebeom79 May 10, 2026
a81b047
Fix: ci ๋นŒ๋“œ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€
jaebeom79 May 10, 2026
d62008b
Merge pull request #54 from catchtable-clone/feat/#49-image-upload
jaebeom79 May 10, 2026
7960828
Fix: ReservationController.java UTF-8 BOM ์ œ๊ฑฐ (CI ์ปดํŒŒ์ผ ์—๋Ÿฌ ํ•ด๊ฒฐ)
jaebeom79 May 10, 2026
934b2e0
Fix: ์˜ˆ์•ฝ ํ…Œ์ŠคํŠธ์ฝ”๋“œ ๊ฒฐ์ œ ์ถ”๊ฐ€
jaebeom79 May 10, 2026
dba5641
Fix: CI ๊ธฐ๋Šฅ ํ…Œ์ŠคํŠธ ์ œ์™ธ
jaebeom79 May 10, 2026
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
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.git
.gitignore
.gradle
build
out
bin
*.iml
.idea
.vscode
.DS_Store
README.md
HELP.md
CLAUDE.md
CICD.md
.env
.env.*
docker-compose*.yml
Dockerfile
.dockerignore
data/
nginx/
init-letsencrypt.sh
certbot/
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
pull_request:
branches: [main]

jobs:
test:
name: Test & Build
runs-on: ubuntu-latest

services:
# PostGIS ํ™•์žฅ ์ž๋™ ํ™œ์„ฑํ™”๋œ PostgreSQL 16
# ์ฃผ์˜: pgvector ํ™•์žฅ์€ ๋ฏธํฌํ•จ โ€” ๋ฒกํ„ฐ ์˜์กด ํ…Œ์ŠคํŠธ๋Š” ๋ณ„๋„ ์ฒ˜๋ฆฌ ํ•„์š”
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10

redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: gradle

- name: Inject application.yaml from secret
run: |
mkdir -p src/main/resources
cat > src/main/resources/application.yaml <<'EOF'
${{ secrets.APPLICATION_YAML }}
EOF

- name: Make gradlew executable
run: chmod +x gradlew

# TODO: ๊ธฐ์กด ํ…Œ์ŠคํŠธ ๋ถ€์ฑ„(DTO ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๋ฏธ์Šค๋งค์น˜, ์ปจํŠธ๋กค๋Ÿฌ ํ…Œ์ŠคํŠธ outdated ๋“ฑ) ์ •๋ฆฌ ํ›„
# ./gradlew test ์žฌํ™œ์„ฑํ™”. ํ˜„์žฌ๋Š” ์ปดํŒŒ์ผ + ๋นŒ๋“œ ๊ฐ€๋Šฅ ์—ฌ๋ถ€๋งŒ ๊ฒ€์ฆ.
# services ๋ธ”๋ก์€ ํ…Œ์ŠคํŠธ ์žฌํ™œ์„ฑํ™” ์‹œ ์ฆ‰์‹œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ทธ๋Œ€๋กœ ์œ ์ง€.
- name: Build bootJar (tests skipped โ€” see TODO above)
run: ./gradlew bootJar -x test

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker build (verify only, no push)
uses: docker/build-push-action@v6
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
126 changes: 126 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Deploy to EC2

on:
push:
branches: [main]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
name: Build & Push to ghcr.io
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
image-tag: ${{ steps.tag.outputs.short_sha }}
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: gradle

- name: Inject application.yaml from secret
run: |
mkdir -p src/main/resources
cat > src/main/resources/application.yaml <<'EOF'
${{ secrets.APPLICATION_YAML }}
EOF

- name: Make gradlew executable
run: chmod +x gradlew

# ํ…Œ์ŠคํŠธ๋Š” PR ์‹œ ci.yml์—์„œ ๊ฒ€์ฆ. ์—ฌ๊ธฐ์„  ์Šคํ‚ต (ํ†ตํ•ฉ ํ…Œ์ŠคํŠธ ํ™˜๊ฒฝ ๋ฏธ๊ตฌ์„ฑ)
- name: Compute short SHA
id: tag
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT

- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build & push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ steps.tag.outputs.short_sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

deploy:
name: Deploy to EC2
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
port: 22
command_timeout: 10m
envs: IMAGE_TAG
script: |
set -e

APP_DIR=/home/${{ secrets.EC2_USER }}/catchtable
REPO_URL=https://github.com/${{ github.repository }}.git

# 1. ๋ ˆํฌ ํด๋ก  ๋˜๋Š” pull (config ํŒŒ์ผ ๋™๊ธฐํ™”)
if [ ! -d "$APP_DIR" ]; then
git clone --depth 1 -b main "$REPO_URL" "$APP_DIR"
fi
cd "$APP_DIR"
git fetch origin main
git reset --hard origin/main

# 2. .env๋ฅผ Secrets์—์„œ ๋งค๋ฒˆ ์ƒˆ๋กœ ์ƒ์„ฑ
cat > .env <<'EOF'
${{ secrets.ENV_FILE }}
EOF

# 3. ๋ฐฐํฌํ•  ์ด๋ฏธ์ง€ ํƒœ๊ทธ ์ถ”๊ฐ€
echo "" >> .env
echo "IMAGE_TAG=sha-${{ needs.build-and-push.outputs.image-tag }}" >> .env
chmod 600 .env

# 4. compose ํŒŒ์ผ ๊ฒฐ์ • (prod ์‚ฌ์šฉ)
COMPOSE="docker-compose.prod.yml"

# 5. ์ƒˆ ์ด๋ฏธ์ง€ ๋ฐ›๊ธฐ (app๋งŒ)
sudo docker compose -f "$COMPOSE" pull app

# 6. app๋งŒ ๊ต์ฒด (nginx/certbot์€ ๊ทธ๋Œ€๋กœ ์œ ์ง€ โ€” ๋ฌด์ค‘๋‹จ ๊ฐ€๊นŒ์›€)
sudo docker compose -f "$COMPOSE" up -d --no-deps app

# 7. ํ—ฌ์Šค์ฒดํฌ (Docker healthcheck ์ƒํƒœ polling, ์ตœ๋Œ€ 90์ดˆ)
echo "Waiting for app to become healthy..."
for i in $(seq 1 18); do
STATUS=$(sudo docker inspect --format='{{.State.Health.Status}}' catchtable-app 2>/dev/null || echo "starting")
if [ "$STATUS" = "healthy" ]; then
echo "โœ… App is healthy"
sudo docker image prune -f
exit 0
fi
echo " ($i/18) status=$STATUS"
sleep 5
done

echo "โŒ Health check failed"
sudo docker compose -f "$COMPOSE" logs --tail=80 app
exit 1
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ build/
!**/src/test/**/build/
application.yaml

### Node (์‹ค์ˆ˜๋กœ ๋ฐฑ์—”๋“œ ํด๋”์— npm ์„ค์น˜๋˜๋Š” ๊ฒƒ ๋ฐฉ์ง€) ###
node_modules/
package.json
package-lock.json
yarn.lock
pnpm-lock.yaml

### STS ###
.apt_generated
.classpath
Expand Down Expand Up @@ -46,3 +53,10 @@ PRD.md

### Data ###
*.csv

### Uploads ###
uploads/

### Static seed images (๋กœ์ปฌ์—์„œ๋งŒ ์‚ฌ์šฉ, ready_image.png๋Š” ์˜ˆ์™ธ) ###
src/main/resources/static/images/*
!src/main/resources/static/images/ready_image.png
35 changes: 33 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
FROM eclipse-temurin:21-jre
# โ”€โ”€ 1๋‹จ๊ณ„: Gradle ๋นŒ๋“œ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
FROM eclipse-temurin:21.0.6_7-jdk-noble AS builder
WORKDIR /app

# ์˜์กด์„ฑ ์บ์‹œ ๋ถ„๋ฆฌ โ€” ์ฝ”๋“œ๋งŒ ๋ฐ”๋€Œ๋ฉด ์˜์กด์„ฑ ์บ์‹œ ์žฌ์‚ฌ์šฉ
COPY gradle gradle
COPY gradlew build.gradle settings.gradle ./
RUN chmod +x gradlew && ./gradlew dependencies --no-daemon

# ์†Œ์Šค ๋ณต์‚ฌ ํ›„ bootJar ๋นŒ๋“œ (ํ…Œ์ŠคํŠธ๋Š” CI์—์„œ ๋ณ„๋„ ์‹คํ–‰)
COPY src src
RUN ./gradlew bootJar --no-daemon -x test

# โ”€โ”€ 2๋‹จ๊ณ„: ์‹คํ–‰ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
FROM eclipse-temurin:21.0.6_7-jre-noble
WORKDIR /app

COPY build/libs/*.jar app.jar
# HEALTHCHECK์šฉ wget ์„ค์น˜ (eclipse-temurin jre-noble ์ด๋ฏธ์ง€์— ๋ฏธํฌํ•จ)
RUN apt-get update \
&& apt-get install -y --no-install-recommends wget \
&& rm -rf /var/lib/apt/lists/*

# ๋น„๋ฃจํŠธ ์œ ์ €๋กœ ์‹คํ–‰
RUN useradd -r -u 1001 spring
USER spring

COPY --from=builder /app/build/libs/*.jar app.jar

# t3.micro(1GB RAM) ํ™˜๊ฒฝ ๊ณ ๋ คํ•œ JVM ๋ฉ”๋ชจ๋ฆฌ ํŠœ๋‹
# ์ปจํ…Œ์ด๋„ˆ์— ํ• ๋‹น๋œ ๋ฉ”๋ชจ๋ฆฌ์˜ 70%๋ฅผ ํž™์œผ๋กœ ์‚ฌ์šฉ (๋‚˜๋จธ์ง€ 30%๋Š” metaspace, ์Šคํƒ, ๋„ค์ดํ‹ฐ๋ธŒ)
ENV JAVA_TOOL_OPTIONS="-XX:MaxRAMPercentage=70.0 -XX:InitialRAMPercentage=50.0"

EXPOSE 8080

HEALTHCHECK --interval=30s --timeout=3s --start-period=60s --retries=3 \
CMD wget -qO- http://localhost:8080/actuator/health | grep -q '"status":"UP"' || exit 1

ENTRYPOINT ["java", "-jar", "app.jar"]
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ dependencies {
implementation platform('org.springframework.ai:spring-ai-bom:1.1.4')
implementation 'org.springframework.ai:spring-ai-starter-model-google-genai'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.github.cdimascio:dotenv-java:3.0.0'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// implementation 'org.springframework.boot:spring-boot-starter-security'
// implementation 'org.springframework.boot:spring-boot-starter-security-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
implementation 'com.google.api-client:google-api-client:2.2.0'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
Expand Down
Loading
Loading