Compare commits

...

2 Commits

Author SHA1 Message Date
Hugo Poissonnet 38adb85d2c feat: docker live reload with hugo dev mode 2022-12-09 01:32:46 +01:00
Hugo Poissonnet 9bfc828bd5 Revert "feat: docker-compose with hugo dev mode"
This reverts commit 5a3be8e546.
2022-12-08 13:16:17 +01:00
5 changed files with 33 additions and 12 deletions

View File

@ -1,3 +1,17 @@
# HugoPoi's blog deploy documentation
* Some deploy code
1. Get the assets
`rsync -a -C --progress home.hugopoi.net:/var/www/my_webapp/www/.content.EZtzwPjb/binary www/.content.EZtzwPjb`
I should put this in git lfs
## Local mode
1. `hugo`
1. `docker compose up`
## Dev mode with hugo live reload
1. `export UID GID=$(id -g)`
1. `docker compose -f docker-compose.yml -f docker-compose.dev.yml up`
1. Go to the [home](http://localhost:8080/)

13
docker-compose.dev.yml Normal file
View File

@ -0,0 +1,13 @@
version: "3"
services:
web:
volumes:
- ./docker-nginx-conf/enable-hugo-reverse-proxy.conf:/etc/nginx/enable-hugo-reverse-proxy.conf
hugo:
image: frankywahl/hugo
working_dir: "/app/v2"
user: "${UID}:${GID}"
volumes:
- ./:/app
command: server --buildDrafts --bind 0.0.0.0

View File

@ -7,15 +7,8 @@ services:
- "8080:80"
volumes:
- ./www:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./docker-nginx-conf/default.conf:/etc/nginx/conf.d/default.conf
php-fpm:
image: php:8-fpm
volumes:
- ./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

@ -6,9 +6,7 @@ server {
root /var/www/html;
try_files $uri $uri/ /index.php;
location /v2 {
proxy_pass http://hugo:1313/v2;
}
include /etc/nginx/enable-hugo-reverse-proxy.conf* ;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;

View File

@ -0,0 +1,3 @@
location /v2 {
proxy_pass http://hugo:1313/v2;
}