Dockerfile deploy
This commit is contained in:
parent
fc84ebb379
commit
26b8e90376
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -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"
|
#relativeURLs = "False"
|
||||||
languageCode = 'en-us'
|
languageCode = 'fr'
|
||||||
title = "Compagnie Le Temps Qu'il Faut"
|
title = "Compagnie Le Temps Qu'il Faut"
|
||||||
buildFuture= true
|
buildFuture= true
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
@ -45,4 +45,4 @@ hugoVersion = "0.111.3"
|
|||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Contact"
|
name = "Contact"
|
||||||
url = "/contact"
|
url = "/contact"
|
||||||
weight = 7
|
weight = 7
|
||||||
|
|||||||
@ -14,7 +14,7 @@ server {
|
|||||||
{{ if (and (eq $listen_port "80") ($.SSL_INUSE)) }}
|
{{ if (and (eq $listen_port "80") ($.SSL_INUSE)) }}
|
||||||
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
||||||
location / {
|
location / {
|
||||||
return 301 https://$host:{{ $.PROXY_SSL_PORT }}$request_uri;
|
return 301 https://{{SSL_SERVER_NAME}}:{{ $.PROXY_SSL_PORT }}$request_uri;
|
||||||
}
|
}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
location / {
|
location / {
|
||||||
@ -111,6 +111,7 @@ server {
|
|||||||
location ~* \.(jpg|jpeg|gif|png|webp|svg|ico)$ {
|
location ~* \.(jpg|jpeg|gif|png|webp|svg|ico)$ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public";
|
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 }}
|
{{ if $.CLIENT_MAX_BODY_SIZE }}client_max_body_size {{ $.CLIENT_MAX_BODY_SIZE }};{{ end }}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user