Skip to content

Commit 2cf9630

Browse files
committed
refactor : 운영서버 환경변수 주입 설정
1 parent 13bd687 commit 2cf9630

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

.github/workflows/prod-server.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,41 @@ jobs:
8282
-p $NEW_PORT:8080 \
8383
--name $NEW_CONTAINER \
8484
--network common \
85+
-e SPRING_PROFILES_ACTIVE=server \
8586
-e SPRING_DATASOURCE_URL="${{secrets.PROD_DB_URL}}" \
8687
-e SPRING_DATASOURCE_USERNAME="${{secrets.PROD_DB_USERNAME}}" \
8788
-e SPRING_DATASOURCE_PASSWORD="${{secrets.PROD_DB_PASSWORD}}" \
89+
# AWS
90+
-e aws.access-key="${{secrets.AWS_ACCESS_KEY_ID}}" \
91+
-e aws.secret-key="${{secrets.AWS_SECRET_ACCESS_KEY}}" \
92+
-e aws.bucket="${{secrets.AWS_S3_BUCKET_NAME}}" \
93+
# RabbitMQ
8894
-e SPRING_RABBITMQ_HOST="${{secrets.PROD_RABBITMQ_HOST}}" \
8995
-e SPRING_RABBITMQ_USERNAME="${{secrets.PROD_RABBITMQ_USERNAME}}" \
9096
-e SPRING_RABBITMQ_PASSWORD="${{secrets.PROD_RABBITMQ_PASSWORD}}" \
97+
# Redis
98+
-e redis-password="${{secrets.PROD_REDIS_PASSWORD}}" \
99+
# OAuth2
100+
-e kakao.client-id="${{secrets.OAUTH_KAKAO_CLIENT_ID}}" \
101+
-e google.client-id="${{secrets.OAUTH_GOOGLE_CLIENT_ID}}" \
102+
-e google.client-secret="${{secrets.OAUTH_GOOGLE_CLIENT_SECRET}}" \
103+
-e KAKAO_REDIRECT_URI="${{PROD_OAUTH_KAKAO_REDIRECT_URI}}" \
104+
-e GOOGLE_REDIRECT_URI="${{PROD_OAUTH_GOOGLE_REDIRECT_URI}}" \
105+
# Sentry
106+
-e sentry-dsn="${{secrets.SENTRY_DSN}}" \
107+
# OpenAI
108+
-e OPENAI_API_KEY="${{secrets.OPENAI_API_KEY}}" \
109+
# Liveblocks
110+
-e liveblocks-secret-key="${{secrets.LIVEBLOCKS_SECRET_KEY}}" \
111+
# naver
112+
-e NAVER_CLIENT_ID="${{secrets.NAVER_CLIENT_ID}}" \
113+
-e NAVER_CLIENT_SECRET="${{secrets.NAVER_CLIENT_SECRET}}" \
114+
# JWT
115+
-e JWT_SECRET_KEY="${{secrets.JWT_SECRET_KEY}}" \
116+
-e JWT_ACCESS_TOKEN_VALIDITY="${{secrets.JWT_ACCESS_TOKEN_VALIDITY}}" \
117+
-e JWT_REFRESH_TOKEN_VALIDITY="${{secrets.JWT_REFRESH_TOKEN_VALIDITY}}" \
118+
# Front
119+
-e front.redirect_domain="${{secrets.FRONT_REDIRECT_DOMAIN}}" \
91120
ghcr.io/${{ github.repository }}/zoopzoop:latest
92121
93122

.github/workflows/test-server-cd.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ jobs:
5959
-p $NEW_PORT:8080 \
6060
--name $NEW_CONTAINER \
6161
--network common \
62-
<<<<<<< HEAD
63-
=======
6462
-e SPRING_PROFILES_ACTIVE=server \
65-
# DB
66-
>>>>>>> 09b4d42 (refactor : 테스트 서버 환경변수 주입 설정)
6763
-e SPRING_DATASOURCE_URL="${{secrets.TEST_DB_URL}}" \
6864
-e SPRING_DATASOURCE_USERNAME="${{secrets.TEST_DB_USERNAME}}" \
6965
-e SPRING_DATASOURCE_PASSWORD="${{secrets.TEST_DB_PASSWORD}}" \

src/main/resources/application-server.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ spring:
1010

1111
data: #RedisTemplate 등을 사용하기 위한 직접 연결용
1212
redis:
13-
host: 10.0.1.246
13+
host: }
1414
port: 6379
1515
timeout: 6000
16-
password: zoopzoopRedisTest!
16+
password: ${redis-password}
1717
cache: #Spring Cache를 사용하기 위한 Redis
1818
type: redis
1919
redis:

src/main/resources/application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ spring:
5151
host: localhost
5252
port: 6379
5353
timeout: 6000
54+
password: ${redis-password}
5455
cache: #Spring Cache를 사용하기 위한 Redis
5556
type: redis
5657
redis:

0 commit comments

Comments
 (0)