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

Enables HTTPS in Anthias #1940

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion docker-compose.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ services:
context: .
dockerfile: docker/Dockerfile.nginx
ports:
- 80:80
- 443:443
environment:
- HOME=/data
depends_on:
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile.nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ ENV GIT_SHORT_HASH=$GIT_SHORT_HASH
ENV GIT_BRANCH=$GIT_BRANCH

COPY docker/nginx/nginx.conf /etc/nginx/sites-enabled/anthias.conf

# @TODO: Find a way to generate the cert and key files ad-hoc.
COPY docker/nginx/cert.pem /etc/nginx/cert.pem
COPY docker/nginx/key.pem /etc/nginx/key.pem

RUN rm -f /etc/nginx/sites-enabled/default

CMD ["nginx", "-g", "daemon off;"]
7 changes: 7 additions & 0 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ upstream websocket {

server {
server_tokens off;

listen 80 default_server;
listen [::]:80 default_server;

listen 443 ssl;
listen [::]:443 ssl;

ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/key.pem;

location / {

# Temporarily disables wifi-connect
Expand Down
Loading