Compare commits
2 Commits
fa5e52f185
...
ba9d4afaa6
| Author | SHA1 | Date | |
|---|---|---|---|
| ba9d4afaa6 | |||
| c10bfaa87c |
@@ -5,4 +5,8 @@ RUN hugo --gc --minify
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=builder /src/public /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -5,6 +5,9 @@ services:
|
||||
- default
|
||||
- reverse-proxy_shared
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
AUTH_USER: hochzeit
|
||||
AUTH_PASS: changeme
|
||||
|
||||
networks:
|
||||
reverse-proxy_shared:
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
echo "${AUTH_USER}:$(openssl passwd -apr1 "${AUTH_PASS}")" > /etc/nginx/.htpasswd
|
||||
exec nginx -g "daemon off;"
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
auth_basic "Hochzeit";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user