diff --git a/README.md b/README.md index 314df5af..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) @@ -151,6 +152,7 @@ Subcommands: Options: --help, -h -> Usage info ``` +It supports hot-reloading, so your changes in the dsl will be reflected immediately. ### Version @@ -243,6 +245,30 @@ 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](https://docs.docker.com/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: 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` + +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