Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungGwan123 committed Nov 27, 2024
1 parent 43ba208 commit c4ef141
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- server: loadbalancer3
host: ${{ vars.LOAD_SSH_HOST_3 }}
type: api3
# - server: loadbalancer4
# host: ${{ vars.LOAD_SSH_HOST_4 }}
# type: api4
- server: loadbalancer4
host: ${{ vars.LOAD_SSH_HOST_4 }}
type: api4
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -105,17 +105,17 @@ jobs:
target: /corinee
overwrite: true

# - name: Send files to loadbalancer
# if: matrix.type == 'api4'
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.LOAD_SSH_HOST_4 }}
# username: ${{ secrets.SSH_USERNAME }}
# password: ${{ secrets.LOAD_SSH_PASSWORD_4 }}
# port: ${{ secrets.SSH_PORT }}
# source: "docker-compose.server.yml,.env"
# target: /corinee
# overwrite: true
- name: Send files to loadbalancer
if: matrix.type == 'api4'
uses: appleboy/scp-action@master
with:
host: ${{ secrets.LOAD_SSH_HOST_4 }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.LOAD_SSH_PASSWORD_4 }}
port: ${{ secrets.SSH_PORT }}
source: "docker-compose.server.yml,.env"
target: /corinee
overwrite: true

- name: Deploy to main server
if: matrix.type == 'full'
Expand Down Expand Up @@ -174,19 +174,19 @@ jobs:
docker-compose -f docker-compose.server.yml down
docker-compose -f docker-compose.server.yml up -d
# - name: Deploy to loadbalancer4
# if: matrix.type == 'api4'
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.LOAD_SSH_HOST_4 }}
# username: ${{ secrets.SSH_USERNAME }}
# password: ${{ secrets.LOAD_SSH_PASSWORD_4 }}
# port: ${{ secrets.SSH_PORT }}
# script: |
# cd /corinee
# docker pull ${{ secrets.DOCKERHUB_USERNAME }}/corinee-server
# docker-compose -f docker-compose.server.yml down
# docker-compose -f docker-compose.server.yml up -d
- name: Deploy to loadbalancer4
if: matrix.type == 'api4'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.LOAD_SSH_HOST_4 }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.LOAD_SSH_PASSWORD_4 }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /corinee
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/corinee-server
docker-compose -f docker-compose.server.yml down
docker-compose -f docker-compose.server.yml up -d
- name: Generate Error Report
if: failure()
Expand Down
10 changes: 5 additions & 5 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ http {

upstream api_servers {
least_conn;
server corinee_server_1:3000; # 메인 서버의 API (docker network 내부 이름 사용)
server 223.130.134.167:3000; # 두 번째 서버의 공인 IP
server 223.130.130.192:3000;
server 211.188.59.137:3000;
# server 211.188.59.126:3000;
server corinee_server_1:3000 weight=4; # 메인 서버의 API (docker network 내부 이름 사용)
server 223.130.134.167:3000 weight=8; # 두 번째 서버의 공인 IP
server 223.130.130.192:3000 weight=8;
server 211.188.59.137:3000 weight=8;
server 211.188.59.126:3000 weight=1;
}

server {
Expand Down

0 comments on commit c4ef141

Please sign in to comment.