diff --git a/Dockerfile b/Dockerfile index 9e05c04..2a83470 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,10 @@ WORKDIR /build RUN hugo -b https://rene.jochums.at -v -t persona - # Copy to a nginx container FROM nginx:1.17-alpine -COPY --from=0 /build/public/* /usr/share/nginx/html/ \ No newline at end of file +COPY docker/nginx/nginx.conf /etc/nginx/ +COPY docker/nginx/default.conf /etc/nginx/conf.d/ + +COPY --from=0 /build/public /var/www/rene.jochums.at diff --git a/deployment.yaml b/deployment.yaml index 80a4a1a..1714532 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -5,8 +5,9 @@ items: kind: Ingress metadata: annotations: - certmanager.k8s.io/cluster-issuer: letsencrypt-stage + certmanager.k8s.io/cluster-issuer: letsencrypt-staging kubernetes.io/tls-acme: "true" + nginx.ingress.kubernetes.io/ssl-redirect: "false" generation: 2 name: website namespace: rene-jochums-at diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf new file mode 100644 index 0000000..2df2d62 --- /dev/null +++ b/docker/nginx/default.conf @@ -0,0 +1,8 @@ +server { + listen 80 default_server; + + error_log /dev/stderr; + access_log /dev/stdout; + + root /var/www/rene.jochums.at; +} \ No newline at end of file diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf new file mode 100644 index 0000000..507c72d --- /dev/null +++ b/docker/nginx/nginx.conf @@ -0,0 +1,30 @@ +user nginx; +worker_processes 4; +pid /run/nginx.pid; + +events { + worker_connections 2048; + multi_accept on; + use epoll; +} + +http { + server_tokens off; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 15; + types_hash_max_size 2048; + include /etc/nginx/mime.types; + default_type application/octet-stream; + access_log off; + error_log off; + gzip on; + gzip_disable "msie6"; + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; + open_file_cache max=100; + client_body_temp_path /tmp 1 2; + client_body_buffer_size 256k; + client_body_in_file_only off; +} \ No newline at end of file