Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added docker-compose to readme.md #280

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
bluecitylights marked this conversation as resolved.
Show resolved Hide resolved
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: `<my_port>:8080`

## Customizing the generated website

The site generator use the
Expand Down