Skip to content

Commit

Permalink
Add new domain (#2403)
Browse files Browse the repository at this point in the history
* Create create_cert.yml

* add new domain

* remove pipeline

Co-authored-by: root <root@runner-fedora35-1.escape-team.tech>
  • Loading branch information
idoktorova and root authored Dec 1, 2022
1 parent 03503d0 commit 3a77706
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
60 changes: 60 additions & 0 deletions default_with_tls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ server {
}
return 301 https://brainup.site$request_uri;
}
server {
listen 80;
server_name brainup.fun;
index index.html;
location ~ /.well-known/acme-challenge {
allow all;
root /usr/share/nginx/html/certcheck;
}
return 301 https://brainup.fun$request_uri;
}

server {
listen 443 ssl;
server_name localhost brainup.site www.brainup.site;
Expand Down Expand Up @@ -51,3 +62,52 @@ server {
root /usr/share/nginx/html;
}
}

server {
listen 443 default_server ssl;
server_name brainup.fun;
ssl_certificate /etc/letsencrypt/live/brainup.fun/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/brainup.fun/privkey.pem;
# Enable gzip compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
text/plain
text/css
application/json
application/javascript
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;

location / {
root /usr/share/nginx/html;
try_files $uri$args $uri$args/ /index.html;
}

location /admin {
root /usr/share/nginx/html;
try_files $uri $uri/ /admin/index.html?/$request_uri;
}

location /api {
proxy_pass http://brn:8081/api;
}

location /.well-known/acme-challenge { #certbot checks
allow all;
root /usr/share/nginx/html/certcheck;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
2 changes: 1 addition & 1 deletion docker-compose-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
- web-root-for-certbot:/var/www/html
depends_on:
- brn_fe_with_tls
command: certonly --webroot --webroot-path=/var/www/html --email brainupspbproject@gmail.com --agree-tos --no-eff-email --force-renewal -d brainup.site -d www.brainup.site
command: certonly --webroot --webroot-path=/var/www/html --email brainupspbproject@gmail.com --agree-tos --no-eff-email --force-renewal -d brainup.fun
secrets:
aws-key:
file: aws-key.properties
Expand Down

0 comments on commit 3a77706

Please sign in to comment.