Skip to content

Commit 007486f

Browse files
Merge pull request #21 from NHSDigital/adding-dev-container
added dev container to nhs-notify repo and auto launch tasks.
2 parents 0f524d9 + b92cdd0 commit 007486f

File tree

9 files changed

+151
-68
lines changed

9 files changed

+151
-68
lines changed

.devcontainer/devcontainer.json

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll
3+
{
4+
"name": "Jekyll",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
7+
// Features to add to the dev container. More info: https://containers.dev/features.
8+
// "features": {},
9+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
10+
// "forwardPorts": [],
11+
// Uncomment the next line to run commands after the container is created.
12+
"postCreateCommand": "zsh scripts/devcontainer/postcreatecommand.sh",
13+
"postStartCommand": "zsh scripts/devcontainer/poststartcommand.sh",
14+
"forwardPorts": [4000],
15+
// Configure tool-specific properties.
16+
"customizations": {
17+
"codespaces": {
18+
"openFiles": [
19+
"README.md",
20+
".github/SECURITY.md",
21+
"docs/index.md"
22+
]
23+
},
24+
"vscode": {
25+
// Set *default* container specific settings.json values on container create.
26+
"settings": {
27+
"editor.formatOnSave": true,
28+
"files.insertFinalNewline": true,
29+
"[makefile]": {
30+
"editor.insertSpaces": false,
31+
"editor.detectIndentation": false
32+
}
33+
},
34+
// Add the IDs of extensions you want installed when the container is created.
35+
"extensions": [
36+
"alefragnani.bookmarks",
37+
"davidanson.vscode-markdownlint",
38+
"dbaeumer.vscode-eslint",
39+
"donjayamanne.githistory",
40+
"eamodio.gitlens",
41+
"editorconfig.editorconfig",
42+
"esbenp.prettier-vscode",
43+
"github.codespaces",
44+
"github.github-vscode-theme",
45+
"github.remotehub",
46+
"github.vscode-github-actions",
47+
"github.vscode-pull-request-github",
48+
"hediet.vscode-drawio",
49+
"johnpapa.vscode-peacock",
50+
"mhutchie.git-graph",
51+
"ms-azuretools.vscode-docker",
52+
"ms-vscode-remote.remote-containers",
53+
"ms-vscode-remote.remote-wsl",
54+
"ms-vscode.hexeditor",
55+
"ms-vscode.live-server",
56+
"ms-vsliveshare.vsliveshare",
57+
"redhat.vscode-xml",
58+
"streetsidesoftware.code-spell-checker-british-english",
59+
"tamasfe.even-better-toml",
60+
"tomoki1207.pdf",
61+
"vscode-icons-team.vscode-icons",
62+
"vstirbu.vscode-mermaid-preview",
63+
"wayou.vscode-todo-highlight",
64+
"yzane.markdown-pdf",
65+
"yzhang.dictionary-completion",
66+
"yzhang.markdown-all-in-one"
67+
]
68+
}
69+
},
70+
"features": {
71+
"ghcr.io/devcontainers/features/aws-cli:1": {
72+
"version": "latest"
73+
},
74+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
75+
"moby": true,
76+
"azureDnsAutoDetection": true,
77+
"installDockerBuildx": true,
78+
"installDockerComposeSwitch": true,
79+
"version": "latest",
80+
"dockerDashComposeVersion": "latest"
81+
},
82+
"ghcr.io/devcontainers/features/node:1": {
83+
"nodeGypDependencies": true,
84+
"version": "lts",
85+
"nvmVersion": "latest"
86+
},
87+
"ghcr.io/devcontainers/features/github-cli:1": {
88+
"installDirectlyFromGitHubRelease": true,
89+
"version": "latest"
90+
},
91+
"ghcr.io/devcontainers/features/common-utils:2": {
92+
"installZsh": true,
93+
"configureZshAsDefaultShell": true,
94+
"installOhMyZsh": true,
95+
"installOhMyZshConfig": true,
96+
"upgradePackages": true,
97+
"username": "automatic",
98+
"userUid": "automatic",
99+
"userGid": "automatic"
100+
}
101+
}
102+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
103+
// "remoteUser": "root"
104+
}

.vscode/extensions.json

-36
This file was deleted.

.vscode/settings.json

-11
This file was deleted.

.vscode/tasks.json

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
12
{
23
"version": "2.0.0",
34
"tasks": [
4-
{
5-
"label": "jekyll",
6-
"options": {
7-
"cwd": "${workspaceFolder}/docs/"
8-
},
9-
"command": "make debug",
10-
"type": "shell"
11-
}
5+
{
6+
"label": "Start Make Config",
7+
"type": "shell",
8+
"command": "make config",
9+
"group": "none",
10+
"presentation": {
11+
"reveal": "always",
12+
"panel": "new"
13+
},
14+
"runOptions": {
15+
"runOn": "folderOpen",
16+
}
17+
}
1218
]
1319
}
File renamed without changes.

docs/.vscode/tasks.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "jekyll",
6+
"options": {
7+
"cwd": "${workspaceFolder}"
8+
},
9+
"command": "make debug",
10+
"type": "shell"
11+
}
12+
]
13+
}

project.code-workspace

-13
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
rm -Rf ~/.asdf
4+
git clone https://github.com/asdf-vm/asdf.git ~/.asdf;
5+
chmod +x ~/.asdf/asdf.sh;
6+
echo '. $HOME/.asdf/asdf.sh' >> ~/.zshrc
7+
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc
8+
9+
source ~/.zshrc
10+
11+
echo 'asdf setup complete'
12+
13+
make config
14+
15+
jekyll --version && cd docs && bundle install
16+
17+
echo 'jekyll setup complete'
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
source ~/.zshrc
3+
make config

0 commit comments

Comments
 (0)