-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
1 deletion.
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,44 @@ | ||
name: Node.js CD | ||
|
||
on: | ||
push: | ||
branches: [ "main", "dev" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: main | ||
steps: | ||
- name: deploy to vps using ssh | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
port: 22 | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
script: | | ||
cd ~/.apps/zannime | ||
git pull | ||
git status | ||
sudo docker compose -f docker-compose.yaml build | ||
sudo docker compose -f docker-compose.yaml up -d | ||
dev-build: | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
steps: | ||
- name: deploy to vps using ssh for dev | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
port: 22 | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
script: | | ||
cd ~/.apps/zannime-dev | ||
git pull | ||
git status | ||
sudo docker compose -f docker-compose-dev.yaml build | ||
sudo docker compose -f docker-compose-dev.yaml up -d |
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,26 @@ | ||
services: | ||
zannime-dev: | ||
build: | ||
context: . | ||
dockerfile: dockerfiles/Dockerfile.zannime | ||
container_name: zannime-dev | ||
restart: unless-stopped | ||
ports: | ||
- "3005:3000" | ||
environment: | ||
- NODE_ENV=development | ||
- API_URL=http://wajik-anime-api-dev:3001 | ||
|
||
wajik-anime-api-dev: | ||
build: | ||
context: wajik-anime-api | ||
dockerfile: ../dockerfiles/Dockerfile.wajik-anime-api | ||
container_name: wajik-anime-api-dev | ||
restart: unless-stopped | ||
expose: | ||
- 3001 | ||
environment: | ||
- NODE_ENV=production | ||
|
||
networks: | ||
zannime-dev: |
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