Skip to content

Commit

Permalink
feat: SSL for web node docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jul 18, 2024
1 parent 70b13bf commit c5492c8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
3 changes: 1 addition & 2 deletions dkgServiceNode/Data/DbEnsure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,10 @@ public static void Ensure(string connectionString)
}

Ensure_0_8_0(connection);
PuVersionUpdate("0.8.1", connection);
PuVersionUpdate("0.8.2", connection);
PuVersionUpdate("0.9.1", connection);
PuVersionUpdate("0.9.2", connection);
PuVersionUpdate("0.9.3", connection);
PuVersionUpdate("0.9.4", connection);
}
}

Expand Down
2 changes: 1 addition & 1 deletion dkgWebNode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ COPY dkgWebNode/config/nginx.docker.config /etc/nginx/conf.d/default.conf

# Expose port 80 for HTTP
EXPOSE 80
#EXPOSE 443
EXPOSE 443
# Start Nginx and keep it running in the foreground
CMD ["nginx", "-g", "daemon off;"]
19 changes: 13 additions & 6 deletions dkgWebNode/config/nginx.docker.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
server {
listen 80;
listen [::]:80;
server_name _ ;

# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$server_name$request_uri;
}

server {
include mime.types;
default_type application/octet-stream;

listen 80 ;
listen [::]:80 ;
# listen 443 ssl ;
# listen [::]:443 ssl ;
# ssl_certificate /etc/nginx/certificate/s.crt;
# ssl_certificate_key /etc/nginx/certificate/s.key;
listen 443 ssl ;
listen [::]:443 ssl ;
ssl_certificate /etc/nginx/certificate/s.crt;
ssl_certificate_key /etc/nginx/certificate/s.key;
root /var/www/dkg;
index index.html;

Expand Down

0 comments on commit c5492c8

Please sign in to comment.