Skip to content

Commit

Permalink
Merge pull request #5 from 4l3j0Ok/development
Browse files Browse the repository at this point in the history
Actions and compose update
  • Loading branch information
4l3j0Ok authored Nov 30, 2023
2 parents 9bb5186 + 9d2366e commit 085417b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ on:
jobs:
build:
environment: prod
runs-on: ubuntu-latest
runs-on: prod
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Docker login
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: deploy
on:
push:
tags:
- "v*"

jobs:
deploy:
name: Deploy to production
runs-on: prod
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Copy docker-compose.yaml
run: |
cp -f ./deploy/docker-compose.yaml ${{ PROJECT_PATH }}/docker-compose.yaml
-
name: Pull changes and restart
run: |
cd ${{ PROJECT_PATH }}
docker-compose down --remove-orphans
docker-compose pull
docker-compose up -d
10 changes: 3 additions & 7 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ version: "3.9"
services:

backend:
image: alejoide/bcra-scraper-api:1.0.2
restart: on-failure
ports:
- 8080:8080
image: alejoide/bcra-scraper-api:latest
restart: unless-stopped
depends_on:
- mongo
env_file:
- backend.env
volumes:
- ../backend/src:/app/src

mongo:
image: mongo:6.0.8
restart: on-failure
restart: unless-stopped
env_file:
- mongo.env
volumes:
Expand Down

0 comments on commit 085417b

Please sign in to comment.