Add production Docker stack with nginx and Tor.

Mirror NullCart's clearnet HTTPS and onion hidden-service pattern for serving the static promo site on a VPS.
This commit is contained in:
2026-09-10 12:48:17 +02:00
parent edbc591a04
commit b57db5f1ac
15 changed files with 294 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
FROM nginx:alpine
RUN apk add --no-cache gettext \
&& rm /etc/nginx/conf.d/default.conf
COPY index.html /usr/share/nginx/html/
COPY css/ /usr/share/nginx/html/css/
COPY assets/ /usr/share/nginx/html/assets/
COPY nginx/conf.d/ /etc/nginx/templates/conf.d/
COPY nginx/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
+27
View File
@@ -0,0 +1,27 @@
server {
listen 80;
server_name ${CLEARNET_DOMAIN} www.${CLEARNET_DOMAIN};
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name ${CLEARNET_DOMAIN} www.${CLEARNET_DOMAIN};
ssl_certificate /etc/nginx/certs/live/${CLEARNET_DOMAIN}/fullchain.pem;
ssl_certificate_key /etc/nginx/certs/live/${CLEARNET_DOMAIN}/privkey.pem;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
+11
View File
@@ -0,0 +1,11 @@
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
set -eu
export CLEARNET_DOMAIN
envsubst '${CLEARNET_DOMAIN}' \
< /etc/nginx/templates/conf.d/clearnet.conf.template \
> /etc/nginx/conf.d/clearnet.conf
cp /etc/nginx/templates/conf.d/onion.conf /etc/nginx/conf.d/onion.conf
exec nginx -g 'daemon off;'