-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CI for rpgf3, staging, production, changed docker-compose
- Loading branch information
Showing
5 changed files
with
65 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: production-deploy-pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH and Redeploy Production | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.PROD_HOST }} | ||
username: ${{ secrets.PROD_USERNAME }} | ||
key: ${{ secrets.PROD_PRIVATE_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd rpgf4-pw-backend | ||
docker-compose down -v | ||
docker image prune -a --force | ||
git checkout master | ||
git pull origin master | ||
docker-compose up -d --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: deploy-pipeline | ||
name: rpgf3-deploy-pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- rpgf3 | ||
|
||
jobs: | ||
deploy: | ||
|
@@ -18,12 +18,11 @@ jobs: | |
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd pw-backend | ||
docker-compose down | ||
git checkout master | ||
docker-compose down -v | ||
docker image prune -a --force | ||
git pull origin master | ||
docker-compose build | ||
docker-compose up -d | ||
git checkout rpgf3 | ||
git pull origin rpgf3 | ||
docker-compose up -d --build | ||
- name: SSH and Redeploy Staging | ||
uses: appleboy/[email protected] | ||
|
@@ -34,9 +33,8 @@ jobs: | |
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd pw-backend | ||
docker-compose down | ||
docker-compose down -v | ||
docker image prune -a --force | ||
git checkout master | ||
git pull origin master | ||
docker-compose build | ||
docker-compose up -d | ||
git checkout rpgf3 | ||
git pull origin rpgf3 | ||
docker-compose up -d --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: staging-deploy-pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH and Redeploy Staging | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.STAGING_HOST }} | ||
username: ${{ secrets.STAGING_USERNAME }} | ||
key: ${{ secrets.STAGING_PRIVATE_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd rpgf4-pw-backend | ||
docker-compose down -v | ||
docker image prune -a --force | ||
git checkout master | ||
git pull origin master | ||
docker-compose up -d --build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,17 @@ | ||
version: '3.9' | ||
version: '3' | ||
|
||
services: | ||
pw-backend: | ||
build: | ||
build: | ||
context: . | ||
container_name: pw-backend | ||
container_name: rpgf4-pw-backend | ||
restart: always | ||
ports: | ||
- 7071:7070 | ||
networks: | ||
- pw-backend | ||
volumes: | ||
- ./data:/usr/src/app/data | ||
caddy: | ||
image: caddy:2-alpine | ||
container_name: caddy | ||
restart: always | ||
networks: | ||
- pw-backend | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
env_file: | ||
- .env | ||
environment: | ||
PW_BACKEND_URL: ${PW_BACKEND_URL:-} | ||
volumes: | ||
- caddy_data:/data | ||
- caddy_config:/config | ||
- ./Caddyfile:/etc/caddy/Caddyfile | ||
|
||
networks: | ||
pw-backend: | ||
volumes: | ||
caddy_data: | ||
caddy_config: |