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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ RUN go build -C src -mod=vendor -o ../compiler
RUN ./compiler -path references.bib > index.html

FROM nginx:alpine
COPY config/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/assets /usr/share/nginx/html/assets
COPY --from=builder /app/index.html /usr/share/nginx/html/index.html
21 changes: 21 additions & 0 deletions config/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
server {
listen 80;
listen [::]:80;
server_name _;

root /usr/share/nginx/html;
index index.html;

# Before Tigris, papers were self-hosted at censorbib.nymity.ch/pdf/.
# To keep these legacy URLs working, we redirect them to Tigris.
location = /pdf {
return 301 https://censorbib-papers.t3.tigrisfiles.io/$is_args$args;
}
location ~ ^/pdf/(.*)$ {
return 301 https://censorbib-papers.t3.tigrisfiles.io/$1$is_args$args;
}

location / {
try_files $uri $uri/ =404;
}
}
Loading