- Run the Structurizr On-Premise Docker Image
docker run -it --rm -p 8080:8080 -v PATH:/usr/local/structurizr structurizr/onpremises
- Replace
PATH
with your path to a directory where structurizer can save its state - Navigate to
localhost:8080
- Login with default username (
structurizr
) and password (password
) - Create a new workspace.
- Go to Settings of the workspace
- Find the API Key and API Secret
- Set environment variables
1.
STRUCTURIZR_API_KEY
- The API Key of your workspace 1.STRUCTURIZR_API_SECRET
- The API Secret off your workspace 1.STRUCTURIZR_WORKSPACE_ID
- The ID of your workspace - Go to
src/MyDiagrams
and rundotnet run
command - Your workspace should have been updated now with the diagram defined in your C# code.
- For the first time, your diagram's layout will be a mess, you can edit the diagram in the browser and click Auto Layout (the magic wand icon), then save the diagram. Any subsequent run of this program will then respect the layout.
randalvance / diagram-as-code Goto Github PK
View Code? Open in Web Editor NEWDiagram as Code using Structurizr