Skip to content

Commit

Permalink
Merge pull request #12 from 4l3j0Ok/development
Browse files Browse the repository at this point in the history
Update deploy workflow
  • Loading branch information
4l3j0Ok authored Dec 24, 2023
2 parents ef69ee4 + 5faf558 commit 50d0375
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 54 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- main
paths:
- "stack/**"

jobs:
deploy:
Expand All @@ -22,13 +24,11 @@ jobs:
name: Setting up Stack
run: |
mkdir -p $PROJECT_PATH
cp -f ./deploy/prod.compose.yml $PROJECT_PATH/docker-compose.yml
echo "$BACKEND_ENV_CONTENT" > $PROJECT_PATH/.backend.env
echo "$MONGO_ENV_CONTENT" > $PROJECT_PATH/.mongo.env
cp -f ./stack/prod.compose.yml $PROJECT_PATH/docker-compose.yml
echo "$ENV_CONTENT" > $PROJECT_PATH/.backend.env
env:
PROJECT_PATH: ${{ secrets.PROJECT_PATH }}
BACKEND_ENV_CONTENT: ${{ secrets.BACKEND_ENV_CONTENT }}
MONGO_ENV_CONTENT: ${{ secrets.MONGO_ENV_CONTENT }}
ENV_CONTENT: ${{ secrets.ENV_CONTENT }}
-
name: Pull changes and restart
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__pycache__/
*.pyc
venv/
deploy/data/
stack/data/
*.env
todo.md
19 changes: 0 additions & 19 deletions deploy/dev.compose.yml

This file was deleted.

27 changes: 0 additions & 27 deletions deploy/docker-compose.yml

This file was deleted.

15 changes: 15 additions & 0 deletions stack/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# BASE APP CONFIG
APP_HOST="0.0.0.0"
APP_PORT="8080"
# MONGO CONNECTION
MONGO_HOST="your-mongo-host"
MONGO_PORT="27017"
MONGO_USER="your-mongo-user"
MONGO_PASS="your-mongo-pass"
# UPDATE ENDPOINTS
ADMIN_USER="your-admin-user"
ADMIN_PASS="your-admin-pass"
# NGINX PROXY
VIRTUAL_HOST="bcra-scraper-api.your-domain.com"
VIRTUAL_PORT="8080"
LETSENCRYPT_HOST="bcra-scraper-api.your-domain.com"
3 changes: 1 addition & 2 deletions deploy/prod.compose.yml → stack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ services:
image: alejoide/bcra-scraper-api:latest
restart: unless-stopped
env_file:
- .backend.env
- .env
networks:
- mongo
- nginx-proxy


# Only for production environments when using jwilder/nginx-proxy.
networks:
nginx-proxy:
Expand Down

0 comments on commit 50d0375

Please sign in to comment.