Skip to content

Commit

Permalink
RDS hots 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KJJDSA committed Jul 15, 2023
1 parent acbc894 commit 21920bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ env:
AWS_REGION: ap-northeast-2
ECR_REGISTRY: 528993883127.dkr.ecr.ap-northeast-2.amazonaws.com/
ECR_REPOSITORY: repository-nestjs
IMAGE_TAG:
DB_HOST: ${{ secret.DB_HOST }}
DB_PORT: ${{ secret.DB_PORT }}
DB_USER: ${{ secret.DB_USER }}
DB_PW: ${{ secret.DB_PW }}
DB_SCHEMA: ${{ secret.DB_SCHEMA }}
JWT_SECRET_KEY: ${{ secret.JWT_SECRET_KEY }}
jobs:
deploy:
name: Deploy
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ COPY . .
EXPOSE 3000

# mysql 서버가 실행되기 전에 앱이 실행되는것을 막아주는 스크립트래요. 이게 문제였던건 아닌것 같지만 사용했습니당
ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /wait-for-it.sh
RUN chmod +x /wait-for-it.sh
# ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /wait-for-it.sh
# RUN chmod +x /wait-for-it.sh

# 앱 실행 명령
CMD /wait-for-it.sh mysql:3306 -- npm run start:seed
CMD npm run start:seed
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
# 컨테이너
nest:
# 컨테이너의 호칭
container_name: v0.2
container_name: test
# 빌드에 사용하는 이미지 혹은 도커파일(저희의 경우 도커파일.)
build:
context: .
Expand All @@ -16,14 +16,15 @@ services:
# 이 컨테이너에서 사용할 다른 컨테이너(docker compose 의 특장점?)
depends_on:
- mysql
# 운영서버에서 얘 쓰면 좆됨
mysql:
image: mysql:latest
# 비밀번호 값을 해시해서 보관하는 옵션을 준대요
#command: --default-authentication-plugin=mysql_native_password
# 환경변수 설정
environment:
MYSQL_ROOT_PASSWORD: 1080a
MYSQL_DATABASE: animalnest2
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: ${{ secret.DB_SCHEMA }}
TZ: Asia/Seoul
ports:
- '3307:3306'
- '3307:3306'

0 comments on commit 21920bb

Please sign in to comment.