Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2401 Add new domain #2403

Merged
merged 5 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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