Skip to content

Commit

Permalink
Enable SSL with cloudflare origin cert on all hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw authored and oscgonfer committed Apr 3, 2024
1 parent ad27c71 commit 9e50950
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions compose/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- 80:80
- 80:80/udp
- 443:443
- 443:443/udp
volumes:
- ../scripts/nginx-conf/api.smartcitizen.me.conf:/etc/nginx/conf.d/api.smartcitizen.me.conf
- ../scripts/nginx.conf:/etc/nginx/nginx.conf
Expand Down
26 changes: 23 additions & 3 deletions scripts/nginx-conf/api.smartcitizen.me.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ upstream docker-push {
}

server {

listen 80;
listen [::]:80;

listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/ssl/star_smartcitizen_me.pem;
ssl_certificate_key /etc/ssl/star_smartcitizen_me.key;

server_name staging-ws.smartcitizen.me ws.smartcitizen.me;

location / {
Expand All @@ -17,7 +25,14 @@ server {

server {
server_name kairos.smartcitizen.me staging-kairos.smartcitizen.me;

listen 80;
listen [::]:80;

listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/ssl/star_smartcitizen_me.pem;
ssl_certificate_key /etc/ssl/star_smartcitizen_me.key;

location / {
proxy_pass http://kairos:8080;
Expand All @@ -32,6 +47,11 @@ server {

listen 80;
listen [::]:80;

listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/ssl/star_smartcitizen_me.pem;
ssl_certificate_key /etc/ssl/star_smartcitizen_me.key;

try_files $uri/index.html $uri @app;

Expand Down Expand Up @@ -74,9 +94,9 @@ server {
server {
server_name api.smartcitizen.me data.smartcitizen.me staging-api.smartcitizen.me staging-data.smartcitizen.me new-api.smartcitizen.me;

listen 80;
listen [::]:80;

listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/ssl/star_smartcitizen_me.pem;
Expand Down

0 comments on commit 9e50950

Please sign in to comment.