Skip to content

Commit f6d3518

Browse files
authored
Feature/crucible docs (#5)
- Adds Crucible Docs repo and additional improvements - Add mkdocs to Aspire deployments - Installs additional vscode extensions for markdown editing/linting - Sets some default VSCode settings - Ignore devcontainer additional certs
1 parent 77204e4 commit f6d3518

File tree

6 files changed

+54
-15
lines changed

6 files changed

+54
-15
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt \
1919
PIP_CERT=/etc/ssl/certs/ca-certificates.crt
2020

2121
# required for those running ARM builds, possibly confined only to Angular 16. Try back later.
22-
RUN apt update
23-
RUN apt install -y python3-dev
22+
RUN apt update && apt install -y python3-dev
23+
24+
# Install Vale
25+
ARG VALE_VERSION=3.12.0
26+
RUN set -eux; \
27+
curl -fsSL -o /tmp/vale.tgz \
28+
"https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" \
29+
&& tar -xzf /tmp/vale.tgz -C /usr/local/bin vale \
30+
&& rm /tmp/vale.tgz \
31+
&& chmod +x /usr/local/bin/vale \
32+
&& vale --version
2433

2534
# Switch back to vscode user
26-
USER vscode
35+
USER vscode

.devcontainer/devcontainer.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
},
1010
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
1111
"ghcr.io/devcontainers/features/dotnet:2": {
12-
"version": "8.0",
13-
"additionalVersions": "7.0, 6.0"
12+
"version": "8.0"
1413
},
1514
"ghcr.io/devcontainers/features/node:1": {},
16-
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}
15+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {},
16+
"ghcr.io/devcontainers-extra/features/markdownlint-cli2:1": {}
1717
},
1818
"containerEnv": {
1919
"NUGET_PACKAGES": "/home/vscode/.nuget/packages" // this might not be needed. will try removing later.
@@ -31,8 +31,22 @@
3131
"ms-dotnettools.csharp",
3232
"microsoft-aspire.aspire-vscode@prerelease", // no official release yet, so have to specify pre-release version
3333
"esbenp.prettier-vscode",
34-
"angular.ng-template"
35-
]
34+
"angular.ng-template",
35+
"DavidAnson.vscode-markdownlint",
36+
"streetsidesoftware.code-spell-checker",
37+
"GitHub.vscode-pull-request-github",
38+
"shardulm94.trailing-spaces",
39+
"chrischinchilla.vale-vscode",
40+
"shd101wyy.markdown-preview-enhanced"
41+
],
42+
"settings": {
43+
"editor.formatOnSave": true,
44+
"files.insertFinalNewline": true,
45+
"files.eol": "\n",
46+
"files.trimTrailingWhitespace": true,
47+
"editor.defaultFormatter": "esbenp.prettier-vscode",
48+
"npm.packageManager": "npm"
49+
}
3650
}
3751
}
3852
}

.devcontainer/repos.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@
7272
"url": "https://github.com/cmu-sei/TopoMojo-ui"
7373
}
7474
]
75+
},
76+
{
77+
"name": "crucible-docs",
78+
"repos": [
79+
{
80+
"name": "crucible-docs",
81+
"url": "https://github.com/cmu-sei/crucible"
82+
}
83+
]
7584
}
7685
]
7786
}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,7 @@ nunit-*.xml
5555

5656
**/appsettings.[Dd]evelopment.json
5757
**/appsettings.[Ss]taging.json
58-
**/appsettings.[Pp]roduction.json
58+
**/appsettings.[Pp]roduction.json
59+
60+
# devcontainer certs
61+
.devcontainer/certs/*.crt

Crucible.AppHost/AppHost.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
.WithLifetime(ContainerLifetime.Persistent)
2020
.WithRealmImport($"{builder.AppHostDirectory}/resources/crucible-realm.json");
2121

22+
var mkdocs = builder.AddContainer("mkdocs", "squidfunk/mkdocs-material")
23+
.WithBindMount("/mnt/data/crucible/crucible-docs/crucible-docs", "/docs", isReadOnly: true)
24+
.WithHttpEndpoint(port: 8000, targetPort: 8000)
25+
.WithArgs("serve", "-a", "0.0.0.0:8000");
26+
2227
builder.AddPlayer(postgres, keycloak, launchOptions);
2328
builder.AddCaster(postgres, keycloak, launchOptions);
2429
builder.AddAlloy(postgres, keycloak, launchOptions);
@@ -187,4 +192,4 @@ public static void AddTopoMojo(this IDistributedApplicationBuilder builder, IRes
187192
.WithHttpEndpoint(port: 4201, env: "PORT", isProxied: false)
188193
.WithNpmPackageInstallation();
189194
}
190-
}
195+
}

crucible-dev.code-workspace

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
},
66
{
77
"path": "/mnt/data/crucible"
8-
},
8+
}
99
],
1010
"settings": {
11-
"dotnet.defaultSolution": "Crucible.slnx"
11+
"dotnet.defaultSolution": "Crucible.slnx",
12+
"cSpell.files": ["**/*.md"]
1213
},
1314
"extensions": {
14-
"recommendations": [
15-
"ms-vscode-remote.remote-containers"
16-
]
15+
"recommendations": ["ms-vscode-remote.remote-containers"]
1716
}
1817
}

0 commit comments

Comments
 (0)