From a83c237d3bff1bbe349d256e19fc28b59d86f4ba Mon Sep 17 00:00:00 2001 From: ctmbl Date: Fri, 17 May 2024 22:31:33 +0200 Subject: [PATCH] Improve and adapt README.md to #53 --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cb28ad2..453c6d5 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,12 @@ docker compose up --detach blog #### Deploy the website itself -Create the blog/prod directory, **it must be writable by users that will write to it: you, builder target, CI user...** +Create the blog/prod and blog/dev directory, **they must be writable by the user/group that will write to it: you, builder target, CI user...** ```sh mkdir -p build/blog/prod -chmod -chown +mkdir -p build/blog/dev +sudo chown -R : build/blog +sudo chmod -R g+w build/blog ``` > you should check first the consistency of the server name (iscsc.fr/localhost) in those files: `nginx.conf`, ... @@ -104,13 +105,19 @@ docker compose build blog docker compose up --detach blog ``` -> Note: before the next step make sure that when cloning the repository you also updated the git submodule! +> Note: before the next step make sure that when cloning the repository you also fetched the git submodule! -Then builds the static website, `./build/blog/prod` is a volume shared with both containers so building the website will automatically "update" it for nginx. +Then build the static website, `./build/blog/prod` is a volume shared with both containers so building the website will automatically "update" it for nginx. ```sh docker compose up builder ``` +After doing this last step, files might have been created with the wrong permissions/owners (it depends if you use the setgid bit, modify the builder container, and even what YOU consider being the right permissions/owners). If needed you might re-do what we've previously: +```sh +sudo chown -R : build/blog +sudo chmod -R g+w build/blog +``` + ### Automatic deployment The repository contains a GitHub Actions which automatically: 1. **builds the website**: allow to check that nothing is broken, publish an artifact which can be downloaded or reused