Dockerfile deploy

pull/11/head
Florian Roger 9 months ago
parent fc84ebb379
commit 26b8e90376

@ -0,0 +1,10 @@
# Use an image that includes both Hugo and Nginx
FROM hugomods/hugo:0.111.3 AS builder
COPY . /src
WORKDIR /src
RUN hugo --minify --gc
FROM hugomods/hugo:nginx
#COPY --from=builder /src/public /usr/share/nginx/html
COPY --from=builder /src/public /site
# Default Nginx config should be sufficient for serving static content

@ -1,6 +1,6 @@
baseURL = 'https://ltqf.fr'
baseURL = 'https://ltqf.fr/'
#relativeURLs = "False"
languageCode = 'en-us'
languageCode = 'fr'
title = "Compagnie Le Temps Qu'il Faut"
buildFuture= true
enableRobotsTXT = true

@ -14,7 +14,7 @@ server {
{{ if (and (eq $listen_port "80") ($.SSL_INUSE)) }}
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
location / {
return 301 https://$host:{{ $.PROXY_SSL_PORT }}$request_uri;
return 301 https://{{SSL_SERVER_NAME}}:{{ $.PROXY_SSL_PORT }}$request_uri;
}
{{ else }}
location / {
@ -111,6 +111,7 @@ server {
location ~* \.(jpg|jpeg|gif|png|webp|svg|ico)$ {
expires 1y;
add_header Cache-Control "public";
proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
}
{{ if $.CLIENT_MAX_BODY_SIZE }}client_max_body_size {{ $.CLIENT_MAX_BODY_SIZE }};{{ end }}

Loading…
Cancel
Save