Skip to content

Commit

Permalink
Merge pull request #105 from volunteers-for-city-projects/ci-cd
Browse files Browse the repository at this point in the history
PR from ci-cd
  • Loading branch information
ArtemKAF authored Oct 28, 2023
2 parents d25681b + 454e01e commit 02a61c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
cd better-together
echo GMAIL_API_CLIENT_ID=${{ secrets.GMAIL_API_CLIENT_ID }} > .env
echo GMAIL_API_CLIENT_SECRET=${{ secrets.GMAIL_API_CLIENT_SECRET }} >> .env
echo GMAIL_API_REFRESH_TOKEN=${{ secrets.GMAIL_API_REFRESH_TOKEN }} >> .env
sudo docker compose -f docker-compose.production.yml pull
sudo docker compose -f docker-compose.production.yml down
sudo docker compose -f docker-compose.production.yml up -d
Expand Down
5 changes: 5 additions & 0 deletions infra_bt/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ DB_PORT=5432 # порт на котором postgre принимает соед
SECRET_KEY='django-insecure' # секретный ключ для Django
DEBUG=False # флаг, активирующий/деактивирующий дебаг-режим
ALLOWED_HOSTS=80.87.109.180,127.0.0.1,localhost,better-together.acceleratorpracticum.ru

PYTHON_VERSION_BUILD=python:3.10.6-alpine3.16 # версия Python при билде образа

GMAIL_API_CLIENT_ID='' # Авторизационные данные для работы django-gmail-api-backend
GMAIL_API_CLIENT_SECRET='' # Авторизационные данные для работы django-gmail-api-backend
GMAIL_API_REFRESH_TOKEN='' # Авторизационные данные для работы django-gmail-api-backend
13 changes: 3 additions & 10 deletions infra_bt/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ server {
}

location / {
try_files $uri $uri/ =404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
if (!-e $request_filename){
rewrite ^(.*)$ /index.html break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/html/frontend/;
}

}

0 comments on commit 02a61c8

Please sign in to comment.