From 9f5c3e47d6f739632a8bfc4eba8428fe24aadd23 Mon Sep 17 00:00:00 2001 From: Leetaehoon <66353672+xogns1514@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:36:37 +0900 Subject: [PATCH] tnwjd --- .github/workflows/be-cd_prod-docker.yml | 140 ++++++++++++------------ 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/.github/workflows/be-cd_prod-docker.yml b/.github/workflows/be-cd_prod-docker.yml index e3e2d135e..6ebc7fd47 100644 --- a/.github/workflows/be-cd_prod-docker.yml +++ b/.github/workflows/be-cd_prod-docker.yml @@ -47,74 +47,74 @@ jobs: docker build --build-arg PROFILE=prod --build-arg DEPENDENCY=build/dependency -t ${{ secrets.DOCKER_REPO_NAME }}/cruru:${{ steps.datetime.outputs.datetime }} --platform linux/arm64 . docker push ${{ secrets.DOCKER_REPO_NAME }}/cruru:${{ steps.datetime.outputs.datetime }} - - name: Upload docker-compose yaml script to artifact - uses: actions/upload-artifact@v4 - with: - name: docker-compose - path: ${{ github.workspace }}/backend/docker-compose.prod.yml - - deploy: - environment: prod - runs-on: [self-hosted, be-prod] - needs: build - defaults: - run: - working-directory: backend - steps: - - name: Set docker-compose YAML script to runner - uses: actions/download-artifact@v4 - with: - name: docker-compose - path: ${{ github.workspace }}/backend - - - name: Extract secrets as .env file - run: | - cat < .env - # Docker Hub info from Github Secrets - DOCKER_REPO_NAME=${{ secrets.DOCKER_REPO_NAME }} - DOCKER_IMAGE_TAG=${{ steps.datetime.outputs.datetime }} - - # DB Configuration secrets info from Github Secrets - DB_PORT=${{ secrets.DB_PORT }} - DB_IP_ADDRESS=${{ secrets.DB_IP_ADDRESS }} - DB_URL=${{ secrets.DB_URL }} - DB_USER=${{ secrets.DB_USER }} - DB_PASSWORD=${{ secrets.DB_PASSWORD }} - DDL_AUTO=${{ secrets.DDL_AUTO }} - - # DB server configuration secrets info from Github Secrets - APP_IP_ADDRESS=${{ secrets.APP_IP_ADDRESS }} - SERVER_BINDING_PORT=${{ secrets.SERVER_BINDING_PORT }} - SERVER_PORT=${{ secrets.SERVER_PORT }} - SUBNET=${{ secrets.SUBNET }} - - # Monitoring configuration server info from Github secrets - MONITORING_BINDING_PORT=${{ secrets.MONITORING_BINDING_PORT }} - MONITORING_PORT=${{ secrets.MONITORING_PORT }} - MONITORING_BASE_PATH=${{ secrets.MONITORING_BASE_PATH }} - - # Apply configuration server info from Github secrets - APPLY_POST_BASE_URL=${{ secrets.APPLY_POST_BASE_URL }} - - # Security settings - JWT_TOKEN_SECRET_KEY=${{ secrets.JWT_TOKEN_SECRET_KEY }} - JWT_TOKEN_EXPIRE_CYCLE=${{ secrets.JWT_TOKEN_EXPIRE_CYCLE }} - JWT_SIGN_ALGORITHM=${{ secrets.JWT_SIGN_ALGORITHM }} - - # Cookie settings - COOKIE_ACCESS_TOKEN_KEY=${{ secrets.COOKIE_ACCESS_TOKEN_KEY }} - COOKIE_HTTP_ONLY=${{ secrets.COOKIE_HTTP_ONLY }} - COOKIE_SECURE=${{ secrets.COOKIE_SECURE }} - COOKIE_DOMAIN=${{ secrets.COOKIE_DOMAIN }} - COOKIE_PATH=${{ secrets.COOKIE_PATH }} - COOKIE_SAME_SITE=${{ secrets.COOKIE_SAME_SITE }} - COOKIE_MAX_AGE=${{ secrets.COOKIE_MAX_AGE }} - EOF +# - name: Upload docker-compose yaml script to artifact +# uses: actions/upload-artifact@v4 +# with: +# name: docker-compose +# path: ${{ github.workspace }}/backend/docker-compose.prod.yml - - name: Stop and remove existing containers - run: | - sudo docker-compose -f docker-compose.prod.yml down --rmi all - - - name: Deploy docker container - run: | - sudo docker-compose --env-file .env -f docker-compose.prod.yml up -d +# deploy: +# environment: prod +# runs-on: [self-hosted, be-prod] +# needs: build +# defaults: +# run: +# working-directory: backend +# steps: +# - name: Set docker-compose YAML script to runner +# uses: actions/download-artifact@v4 +# with: +# name: docker-compose +# path: ${{ github.workspace }}/backend +# +# - name: Extract secrets as .env file +# run: | +# cat < .env +# # Docker Hub info from Github Secrets +# DOCKER_REPO_NAME=${{ secrets.DOCKER_REPO_NAME }} +# DOCKER_IMAGE_TAG=${{ steps.datetime.outputs.datetime }} +# +# # DB Configuration secrets info from Github Secrets +# DB_PORT=${{ secrets.DB_PORT }} +# DB_IP_ADDRESS=${{ secrets.DB_IP_ADDRESS }} +# DB_URL=${{ secrets.DB_URL }} +# DB_USER=${{ secrets.DB_USER }} +# DB_PASSWORD=${{ secrets.DB_PASSWORD }} +# DDL_AUTO=${{ secrets.DDL_AUTO }} +# +# # DB server configuration secrets info from Github Secrets +# APP_IP_ADDRESS=${{ secrets.APP_IP_ADDRESS }} +# SERVER_BINDING_PORT=${{ secrets.SERVER_BINDING_PORT }} +# SERVER_PORT=${{ secrets.SERVER_PORT }} +# SUBNET=${{ secrets.SUBNET }} +# +# # Monitoring configuration server info from Github secrets +# MONITORING_BINDING_PORT=${{ secrets.MONITORING_BINDING_PORT }} +# MONITORING_PORT=${{ secrets.MONITORING_PORT }} +# MONITORING_BASE_PATH=${{ secrets.MONITORING_BASE_PATH }} +# +# # Apply configuration server info from Github secrets +# APPLY_POST_BASE_URL=${{ secrets.APPLY_POST_BASE_URL }} +# +# # Security settings +# JWT_TOKEN_SECRET_KEY=${{ secrets.JWT_TOKEN_SECRET_KEY }} +# JWT_TOKEN_EXPIRE_CYCLE=${{ secrets.JWT_TOKEN_EXPIRE_CYCLE }} +# JWT_SIGN_ALGORITHM=${{ secrets.JWT_SIGN_ALGORITHM }} +# +# # Cookie settings +# COOKIE_ACCESS_TOKEN_KEY=${{ secrets.COOKIE_ACCESS_TOKEN_KEY }} +# COOKIE_HTTP_ONLY=${{ secrets.COOKIE_HTTP_ONLY }} +# COOKIE_SECURE=${{ secrets.COOKIE_SECURE }} +# COOKIE_DOMAIN=${{ secrets.COOKIE_DOMAIN }} +# COOKIE_PATH=${{ secrets.COOKIE_PATH }} +# COOKIE_SAME_SITE=${{ secrets.COOKIE_SAME_SITE }} +# COOKIE_MAX_AGE=${{ secrets.COOKIE_MAX_AGE }} +# EOF +# +# - name: Stop and remove existing containers +# run: | +# sudo docker-compose -f docker-compose.prod.yml down --rmi all +# +# - name: Deploy docker container +# run: | +# sudo docker-compose --env-file .env -f docker-compose.prod.yml up -d