chore(docker): move nginx config to a separate folder

Also kept the example SSL config from #82 in case it is useful to someone
This commit is contained in:
azurejelly 2025-07-25 19:17:17 -04:00
parent 4f54d92494
commit c62633bd23
No known key found for this signature in database
GPG Key ID: 78C7CB2FBB62D96D
3 changed files with 43 additions and 2 deletions

View File

@ -26,6 +26,6 @@ RUN bun run build
FROM nginx:stable-alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/build /usr/share/nginx/html
COPY --from=builder /app/build /usr/share/nginx/html

26
nginx/default-ssl.conf Normal file
View File

@ -0,0 +1,26 @@
server {
listen 80;
server_name vert;
# Redirect all HTTP traffic to HTTPS
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name vert;
ssl_certificate /etc/ssl/vert/vert.crt;
ssl_certificate_key /etc/ssl/vert/vert.key;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 10M;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /index.html;
}

15
nginx/default.conf Normal file
View File

@ -0,0 +1,15 @@
server {
listen 80;
server_name vert;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 10M;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /index.html;
}