diff --git a/docker-compose.yaml b/docker-compose.yaml index b5f7878..a4c5557 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,15 @@ services: + nginx: + image: nginx:latest + ports: + - '80:80' + - '443:443' + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf + - ./CertSSL:/etc/nginx/ssl + depends_on: + - starlio-web + starlio-web: build: . ports: diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..b5202ac --- /dev/null +++ b/nginx.conf @@ -0,0 +1,30 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + server_name example.com + + location / { + return 301 https://$host$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name example.com + + ssl_certificate /etc/nginx/ssl/fullchain.pem; + ssl_certificate_key /etc/nginx/ssl/privkey.pem; + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + + # modern configuration + ssl_protocols TLSv1.3; + ssl_prefer_server_ciphers off; + + # HSTS (ngx_http_headers_module is required) (63072000 seconds) + add_header Strict-Transport-Security "max-age=63072000" always; + + # replace with the IP address of your resolver +} \ No newline at end of file