Skip to content
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,7 @@ tests-ui/screenshots/
*.docx#

publications/static/OPTIMAP_Data-Privacy-Concept.docx

certbot/conf/

certbot/www/
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ The **logos** and favicon are in the repository in the folder [`publications/sta

## Deploy

~~Deploy using `docker-compose` or see [`fly.io.md`](fly.io.md) for notes on deploying to Fly.io.~~
The app is deployed in the TUD Enterprise Cloud.
HTTPS certificate is retrieved via `certbot`, see `docker-compose.deploy.yml` for the configuration and documentation links.

## Operation

Expand Down
Empty file added certbot/.keepdir
Empty file.
12 changes: 11 additions & 1 deletion docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,20 @@ services:
image: nginx:1.27-alpine
volumes:
- "./etc/nginx.deploy.conf:/etc/nginx/nginx.conf:ro"
- "./certbot/www/:/var/www/certbot/:ro"
- "./certbot/conf/:/etc/nginx/ssl/:ro"
ports:
- "80:80"
- "443:443"
depends_on:
- app
- app
restart: always

certbot:
image: certbot/certbot:latest
volumes:
- "./certbot/www/:/var/www/certbot/:rw"
- "./certbot/conf/:/etc/letsencrypt/:rw"

volumes:
optimap-volume:
Expand Down
26 changes: 25 additions & 1 deletion etc/nginx.deploy.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

worker_processes 1;
worker_processes auto;

events {
worker_connections 1024;
Expand All @@ -18,6 +18,30 @@ http {

server {
listen 80;
listen [::]:80;
server_name optimap.geo.tu-dresden.de;

# https://xavierz.dev/blog/posts/certbot-docker
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

location / {
return 301 https://$host$request_uri;
}

}

server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on; # https://aruljohn.com/blog/nginx-listen-http2-directive-deprecated/
server_name optimap.geo.tu-dresden.de;

# via certbot, see https://xavierz.dev/blog/posts/certbot-docker
ssl_certificate /etc/nginx/ssl/live/optimap.geo.tu-dresden.de/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/optimap.geo.tu-dresden.de/privkey.pem;

server_name optimap.geo.tu-dresden.de;

location / {
Expand Down
217 changes: 0 additions & 217 deletions fly.io.md

This file was deleted.

61 changes: 0 additions & 61 deletions fly.toml

This file was deleted.