feat: docker-compose with hugo dev mode

NEED REWORK
This commit is contained in:
Hugo Poissonnet 2022-12-08 12:57:43 +01:00
parent 7485ce2e04
commit 5a3be8e546
2 changed files with 12 additions and 0 deletions

View File

@ -12,3 +12,10 @@ services:
image: php:8-fpm image: php:8-fpm
volumes: volumes:
- ./www:/var/www/html - ./www:/var/www/html
hugo:
image: mbentley/hugo
working_dir: "/data"
user: "${UID}:${GID}"
volumes:
- ./v2:/data
command: server -D --bind 0.0.0.0

View File

@ -5,6 +5,11 @@ server {
# access_log /var/log/nginx/access.log; # access_log /var/log/nginx/access.log;
root /var/www/html; root /var/www/html;
try_files $uri $uri/ /index.php; try_files $uri $uri/ /index.php;
location /v2 {
proxy_pass http://hugo:1313/v2;
}
location ~ \.php$ { location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000; fastcgi_pass php-fpm:9000;