Skip to content

Commit 4f71e5d

Browse files
committed
Merge branch 'feat/#15-mariadb-migration' into develop
2 parents a90c978 + 973b06e commit 4f71e5d

25 files changed

Lines changed: 918 additions & 30 deletions
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Create Harbor Secret
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
create-secret:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: AWS 자격증명 설정
13+
uses: aws-actions/configure-aws-credentials@v4
14+
with:
15+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
16+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17+
aws-region: ap-northeast-2
18+
19+
- name: kubeconfig 설정
20+
run: |
21+
aws eks update-kubeconfig \
22+
--name skala3-cloud1-team8 \
23+
--region ap-northeast-2
24+
25+
- name: harbor-secret 생성
26+
run: |
27+
kubectl create secret docker-registry harbor-secret \
28+
-n opentraum \
29+
--docker-server=${{ secrets.HARBOR_REGISTRY }} \
30+
--docker-username=${{ secrets.HARBOR_USERNAME }} \
31+
--docker-password=${{ secrets.HARBOR_PASSWORD }} \
32+
--dry-run=client -o yaml | kubectl apply --validate=false -f -

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ docker-compose.override.yml
4242
k8s/*-secret.yml
4343
k8s/**/secret.yml
4444
k8s/secrets/
45+
k8s/secrets.yml
4546

4647
# =========================
4748
# Terraform (future)

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ services:
149149
SPRING_CLOUD_GATEWAY_ROUTES_1_PREDICATES_0: Path=/api/v1/users/**,/api/v1/tenants/**
150150
SPRING_CLOUD_GATEWAY_ROUTES_2_ID: event-service
151151
SPRING_CLOUD_GATEWAY_ROUTES_2_URI: http://event-service:8083
152-
SPRING_CLOUD_GATEWAY_ROUTES_2_PREDICATES_0: Path=/api/v1/concerts/**,/api/v1/schedules/**,/api/v1/admin/seats/**
152+
SPRING_CLOUD_GATEWAY_ROUTES_2_PREDICATES_0: Path=/api/v1/concerts/**,/api/v1/schedules/**,/api/v1/admin/seats/**,/api/v1/admin/events/**,/api/v1/admin/venues/**
153153
SPRING_CLOUD_GATEWAY_ROUTES_3_ID: reservation-service
154154
SPRING_CLOUD_GATEWAY_ROUTES_3_URI: http://reservation-service:8084
155155
SPRING_CLOUD_GATEWAY_ROUTES_3_PREDICATES_0: Path=/api/v1/reservations/**,/api/v1/queue/**,/api/v1/live/**,/api/v1/lottery/**
@@ -271,6 +271,8 @@ services:
271271
REDIS_HOST: redis
272272
REDIS_PORT: 6379
273273
KAFKA_BOOTSTRAP_SERVERS: kafka:29092
274+
# OpenAI (AI 이벤트 생성)
275+
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
274276
depends_on:
275277
postgres:
276278
condition: service_healthy

docker/Dockerfile.web

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ FROM nginx:alpine
1717

1818
COPY --from=builder /app/dist /usr/share/nginx/html
1919

20-
# nginx.conf는 docker-compose volume mount 또는 별도 COPY로 제공
21-
# 기본 설정: SPA fallback + API 프록시
22-
RUN echo 'server { \n\
23-
listen 3000; \n\
24-
server_name localhost; \n\
25-
root /usr/share/nginx/html; \n\
26-
index index.html; \n\
27-
location / { try_files $uri $uri/ /index.html; } \n\
28-
location /api/ { \n\
29-
proxy_pass http://gateway:8080; \n\
30-
proxy_set_header Host $host; \n\
31-
proxy_set_header X-Real-IP $remote_addr; \n\
32-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \n\
33-
proxy_http_version 1.1; \n\
34-
proxy_read_timeout 300s; \n\
35-
} \n\
36-
gzip on; \n\
37-
gzip_types text/plain text/css application/json application/javascript text/xml; \n\
38-
}' > /etc/nginx/conf.d/default.conf
20+
# SPA fallback + API 프록시
21+
RUN printf 'server {\n\
22+
listen 3000;\n\
23+
server_name localhost;\n\
24+
root /usr/share/nginx/html;\n\
25+
index index.html;\n\
26+
location / { try_files $uri $uri/ /index.html; }\n\
27+
location = /index.html { add_header Cache-Control "no-cache, no-store, must-revalidate"; }\n\
28+
location /api/ {\n\
29+
proxy_pass http://gateway:8080;\n\
30+
proxy_set_header Host $host;\n\
31+
proxy_set_header X-Real-IP $remote_addr;\n\
32+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
33+
proxy_http_version 1.1;\n\
34+
proxy_read_timeout 300s;\n\
35+
}\n\
36+
gzip on;\n\
37+
gzip_types text/plain text/css application/json application/javascript text/xml;\n\
38+
}\n' > /etc/nginx/conf.d/default.conf
3939

4040
EXPOSE 3000
4141

k8s/argocd/auth-service-app.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: opentraum-auth-service
5+
namespace: argocd
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
8+
spec:
9+
project: default
10+
source:
11+
repoURL: git@github.com:OpenTraum/OpenTraum-auth-service.git
12+
targetRevision: main
13+
path: k8s
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: opentraum
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- CreateNamespace=true
23+
- PruneLast=true
24+
retry:
25+
limit: 3
26+
backoff:
27+
duration: 10s
28+
maxDuration: 3m
29+
factor: 2

k8s/argocd/event-service-app.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: opentraum-event-service
5+
namespace: argocd
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
8+
spec:
9+
project: default
10+
source:
11+
repoURL: git@github.com:OpenTraum/OpenTraum-event-service.git
12+
targetRevision: main
13+
path: k8s
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: opentraum
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- CreateNamespace=true
23+
- PruneLast=true
24+
retry:
25+
limit: 3
26+
backoff:
27+
duration: 10s
28+
maxDuration: 3m
29+
factor: 2

k8s/argocd/gateway-app.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: opentraum-gateway
5+
namespace: argocd
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
8+
spec:
9+
project: default
10+
source:
11+
repoURL: git@github.com:OpenTraum/OpenTraum-gateway.git
12+
targetRevision: main
13+
path: k8s
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: opentraum
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- CreateNamespace=true
23+
- PruneLast=true
24+
retry:
25+
limit: 3
26+
backoff:
27+
duration: 10s
28+
maxDuration: 3m
29+
factor: 2

k8s/argocd/infra-app.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: opentraum-infra
5+
namespace: argocd
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
8+
spec:
9+
project: default
10+
source:
11+
repoURL: git@github.com:OpenTraum/OpenTraum-Infra.git
12+
targetRevision: main
13+
path: k8s
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: opentraum
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- CreateNamespace=true
23+
- PruneLast=true
24+
retry:
25+
limit: 3
26+
backoff:
27+
duration: 10s
28+
maxDuration: 3m
29+
factor: 2

k8s/argocd/payment-service-app.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: opentraum-payment-service
5+
namespace: argocd
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
8+
spec:
9+
project: default
10+
source:
11+
repoURL: git@github.com:OpenTraum/OpenTraum-payment-service.git
12+
targetRevision: main
13+
path: k8s
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: opentraum
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- CreateNamespace=true
23+
- PruneLast=true
24+
retry:
25+
limit: 3
26+
backoff:
27+
duration: 10s
28+
maxDuration: 3m
29+
factor: 2
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: opentraum-reservation-service
5+
namespace: argocd
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
8+
spec:
9+
project: default
10+
source:
11+
repoURL: git@github.com:OpenTraum/OpenTraum-reservation-service.git
12+
targetRevision: main
13+
path: k8s
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: opentraum
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- CreateNamespace=true
23+
- PruneLast=true
24+
retry:
25+
limit: 3
26+
backoff:
27+
duration: 10s
28+
maxDuration: 3m
29+
factor: 2

0 commit comments

Comments
 (0)