Skip to content

Commit

Permalink
ACTION :: xquare deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdl0525 committed Jun 4, 2024
1 parent 58999da commit bd6e8d8
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/xquare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: xquare-deployment

on:
push:
branches: [ "main" ]

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: prod
access_key: ${{ secrets.XQUARE_ACCESS_KEY }}
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
buildargs: |
PROFILE=prod
REDIS_HOST=${{ secrets.REDIS_HOST }}
REDIS_USERNAME=${{ secrets.REDIS_USERNAME }}
REDIS_PORT=${{ secrets.REDIS_PORT }}
DB_HOST=${{ secrets.DB_HOST }}
DB_USERNAME=${{ secrets.DB_USERNAME }}
DB_PASSWORD=${{ secrets.DB_PASSWORD }}
DB_NAME=${{ secrets.DB_NAME }}
DB_PORT=${{ secrets.DB_PORT }}
PORT=${{ secrets.PORT }}
SECRET_KEY=${{ secrets.SECRET_KEY }}
AC_TOKEN_EXP=${{ secrets.AC_TOKEN_EXP }}
RF_TOKEN_EXP=${{ secrets.RF_TOKEN_EXP }}
REDIS_PORT=${{ secrets.REDIS_PORT }}
OAUTH_GOOGLE_ID=${{ secrets.OAUTH_GOOGLE_ID }}
KAKAO_CLIENT_ID=${{ secrets.KAKAO_CLIENT_ID }}
KAKAO_SECRET_KEY=${{ secrets.KAKAO_SECRET_KEY }}
KAKAO_REDIRECT_URI=${{ secrets.KAKAO_REDIRECT_URI }}
AWS_S3_BUCKET_NAME=${{ secrets.AWS_S3_BUCKET_NAME }}
AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}
7 changes: 7 additions & 0 deletions .xquare/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config:
name: propofol
service_type: be
port: 80
domain:
stag: p-stag.xquare.app
prod: propofol.xquare.app
58 changes: 56 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,61 @@ WORKDIR /app
COPY --chown=node:node --from=build /app/node_modules ./node_modules
COPY --chown=node:node --from=build /app/dist ./dist

ARG NODE_ENV=production
ENV NODE_ENV NODE_ENV
ARG PROFILE
ENV NODE_ENV ${PROFILE}

ARG REDIS_HOST
ENV REDIS_HOST ${REDIS_HOST}

ARG REDIS_PORT
ENV REDIS_PORT ${REDIS_PORT}

ARG DB_HOST
ENV DB_HOST ${DB_HOST}

ARG DB_USERNAME
ENV DB_USERNAME ${DB_USERNAME}

ARG DB_PASSWORD
ENV DB_PASSWORD ${DB_PASSWORD}

ARG DB_NAME
ENV DB_NAME ${DB_NAME}

ARG DB_PORT
ENV DB_PORT ${DB_PORT}

ARG PORT
ENV PORT ${PORT}

ARG SECRET_KEY
ENV SECRET_KEY ${SECRET_KEY}

ARG AC_TOKEN_EXP
ENV AC_TOKEN_EXP ${AC_TOKEN_EXP}

ARG RF_TOKEN_EXP
ENV RF_TOKEN_EXP ${RF_TOKEN_EXP}

ARG OAUTH_GOOGLE_ID
ENV OAUTH_GOOGLE_ID ${OAUTH_GOOGLE_ID}

ARG KAKAO_CLIENT_ID
ENV KAKAO_CLIENT_ID ${KAKAO_CLIENT_ID}

ARG KAKAO_SECRET_KEY
ENV KAKAO_SECRET_KEY ${KAKAO_SECRET_KEY}

ARG KAKAO_REDIRECT_URI
ENV KAKAO_REDIRECT_URI ${KAKAO_REDIRECT_URI}

ARG AWS_S3_BUCKET_NAME
ENV AWS_S3_BUCKET_NAME ${AWS_S3_BUCKET_NAME}

ARG AWS_ACCESS_KEY
ENV AWS_ACCESS_KEY ${AWS_ACCESS_KEY}

ARG AWS_SECRET_KEY
ENV AWS_SECRET_KEY ${AWS_SECRET_KEY}

CMD ["node", "dist/main.js"]

0 comments on commit bd6e8d8

Please sign in to comment.