Skip to content

Commit

Permalink
test deploy8
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGsk committed Sep 27, 2024
1 parent 5110552 commit fedd3f2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/prod_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
source: "infra"
target: "${{ env.DEPLOY_PATH }}"
overwrite: true

- name: Execute commands on VPS
uses: appleboy/ssh-action@master
with:
Expand All @@ -103,7 +103,6 @@ jobs:
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
cd ${{ env.DEPLOY_PATH }}
rm .env
touch .env
echo "${{ secrets.ENV_FILE }}" > .env
Expand Down
39 changes: 39 additions & 0 deletions infra/nginx/nginx_prod.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
server {
listen 80;
listen [::]:80;
server_name _;
return 308 https://$host$request_uri;
}

server {
listen 443 ssl http2; # REMOVED default_server
listen [::]:443 ssl http2; # REMOVED default_server

server_name ${HOST}; # PUT YOUR DOMAIN HERE

include /config/nginx/ssl.conf;

location / {
proxy_pass http://site:8000;
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;
}

location /admin/ {
proxy_pass http://site:8000/admin/;
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;
}

location /media/ {
root /var/html/;
}

location /static/ {
root /var/html/;
}
}
2 changes: 1 addition & 1 deletion infra/prod/docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
- VALIDATION=http
- STAGING=${ST}
volumes:
- ../nginx/nginx_stage.conf:/config/nginx/site-confs/default.conf
- ../nginx/nginx_prod.conf:/config/nginx/site-confs/default.conf
- swag_volume_stage:/config
- static_value:/var/html/static/
- ../../media:/var/html/media/
Expand Down

0 comments on commit fedd3f2

Please sign in to comment.