Skip to content

Commit

Permalink
Merge pull request #115 from Pet-projects-CodePET/feature/cors
Browse files Browse the repository at this point in the history
fixed path in volumes
  • Loading branch information
VladislavCR authored Mar 18, 2024
2 parents aecc353 + f4add32 commit 0b1e823
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions infra/docker-compose-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
- "443:443"
volumes:
- static_volume:/staticfiles/
- media_value:/var/html/media/
- media_value:/mediafiles/
- certbot:/certbot/
- letsencrypt:/letsencrypt/
restart: unless-stopped
Expand All @@ -65,8 +65,8 @@ services:
certbot:
image: certbot/certbot
volumes:
- certbot:/certbot/
- letsencrypt:/letsencrypt/
- certbot:/var/www/certbot/
- letsencrypt:/etc/letsencrypt/
restart: unless-stopped
depends_on:
- backend
Expand Down
52 changes: 26 additions & 26 deletions infra/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ server {
}

location /.well-known/acme-challenge/ {
root /certbot/;
root /certbot;
}

location / {
Expand All @@ -29,36 +29,36 @@ server {
}
}

# server {
# listen 443 default_server ssl http2;
# listen [::]:443 ssl http2;
# server_name 89.23.117.80 devcodepet.tw1.ru;
server {
listen 443 default_server ssl http2;
listen [::]:443 ssl http2;
server_name 89.23.117.80 devcodepet.tw1.ru;

# ssl_certificate /etc/nginx/ssl/live/devcodepet.tw1.ru/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/live/devcodepet.tw1.ru/privkey.pem;
# include /etc/letsencrypt/options-ssl-nginx.conf;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
ssl_certificate /letsencrypt/live/devcodepet.tw1.ru/fullchain.pem;
ssl_certificate_key /letsencrypt/live/devcodepet.tw1.ru/privkey.pem;
include /letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /letsencrypt/ssl-dhparams.pem;

# root /staticfiles;
root /staticfiles;

# location /api/v1/ {
# proxy_set_header Host $http_host;
# proxy_pass http://backend:8000/api/v1/;
# }
# location /admin/ {
# proxy_set_header Host $http_host;
# proxy_pass http://backend:8000/admin/;
# }
location /api/v1/ {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/api/v1/;
}
location /admin/ {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/admin/;
}

# location / {
# try_files $uri $uri.html $uri/ =404;
# }
location / {
try_files $uri $uri.html $uri/ =404;
}

# error_page 404 /404.html;
# location = /404.html {
# internal;
# }
# }
error_page 404 /404.html;
location = /404.html {
internal;
}
}

# server {
# listen 443 default_server ssl http2;
Expand Down

0 comments on commit 0b1e823

Please sign in to comment.