From e96ea8c3c9c80216662affddfef9c460e11976fb Mon Sep 17 00:00:00 2001 From: bluecitylights <30653230+bluecitylights@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:35:42 +0000 Subject: [PATCH 1/4] chore: added docker-compose to readme.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 5694f3f1..ad0fb296 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,29 @@ Generatr container. So is needed to expose the container's port 8080 to the host (web browser). In the example above, the `-p 8080:8080` argument tells Docker to bind the local machine / host's port 8080 to the container's port 8080. +#### Simplify using Docker-Compose +Using Docker-Compose we can simplify the process. +Add a docker-compose.yml next to your workspace.dsl. +Add contents +``` +version: '3' +services: + structurizr-site-generatr: + image: ghcr.io/avisi-cloud/structurizr-site-generatr + volumes: + - .:/var/model + # command: generate-site -w workspace.dsl + command: serve -w workspace.dsl + working_dir: /var/model + ports: + - 8080:8080 +``` +from your workspace folder, run +``` +docker-compose up +``` +This will host your pages at `localhost:8080` + ## Customizing the generated website The site generator use the From 6c9933dfd33183064f928fe800493c7986b91d76 Mon Sep 17 00:00:00 2001 From: bluecitylights <30653230+bluecitylights@users.noreply.github.com> Date: Fri, 4 Aug 2023 18:46:23 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ad0fb296..a69fd5c6 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Subcommands: Options: --help, -h -> Usage info ``` +It supports hot-reloading, so your changes in the dsl will be reflected immediately. ### Version From 1455be8f240b52d200f021d82aca7501f4afc8dc Mon Sep 17 00:00:00 2001 From: bluecitylights <30653230+bluecitylights@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:19:49 +0000 Subject: [PATCH 3/4] apply review comments --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b98c9428..dc2e31a6 100644 --- a/README.md +++ b/README.md @@ -244,8 +244,8 @@ Generatr container. So is needed to expose the container's port 8080 to the host (web browser). In the example above, the `-p 8080:8080` argument tells Docker to bind the local machine / host's port 8080 to the container's port 8080. -#### Simplify using Docker-Compose -Using Docker-Compose we can simplify the process. +#### Simplify using Docker Compose +Using [Docker Compose](https://docs.docker.com/compose) we can simplify the process. Add a docker-compose.yml next to your workspace.dsl. Add contents ``` @@ -255,7 +255,6 @@ services: image: ghcr.io/avisi-cloud/structurizr-site-generatr volumes: - .:/var/model - # command: generate-site -w workspace.dsl command: serve -w workspace.dsl working_dir: /var/model ports: @@ -267,6 +266,8 @@ docker-compose up ``` This will host your pages at `localhost:8080` +You can adjust the command to tailor it to your needs, for example by including `--assets-dir` option to including an assets-folder. Also you can change the port number used to host the site: `:8080` + ## Customizing the generated website The site generator use the From a77c58baba522c0f97b5104e5c3104099316a2a1 Mon Sep 17 00:00:00 2001 From: bluecitylights <30653230+bluecitylights@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:57:09 +0000 Subject: [PATCH 4/4] fix: applied review comment --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dc2e31a6..1b84c76b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ * [Generate a website](#generate-a-website) * [From a C4 Workspace](#from-a-c4-workspace) * [For those taking the Docker approach](#for-those-taking-the-docker-approach) + * [Simplify using Docker Compose](#simplify-using-docker-compose ) * [Generate a website from a Git repository](#generate-a-website-from-a-git-repository) * [Start a development web server around the generated website](#start-a-development-web-server-around-the-generated-website) * [For those taking the Docker approach](#for-those-taking-the-docker-approach-1)