chore: update devcontainer
this is pre-work for upcoming Backstage ContribFest at KubeCon Amsterdam to hopefully make it easier for people to start contributing. node was updated to 24 to support the latest things in backstage, additionally necessary vscode plugins and settings are now included. Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
FROM mcr.microsoft.com/devcontainers/typescript-node:24
|
||||
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y install chromium \
|
||||
&& apt-get -y install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
|
||||
@@ -0,0 +1 @@
|
||||
NODE_OPTIONS=--no-node-snapshot
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "Backstage",
|
||||
"forwardPorts": [3000, 7007],
|
||||
"build": { "dockerfile": "Dockerfile" },
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/common-utils:2.5.5": {},
|
||||
"ghcr.io/devcontainers-contrib/features/mkdocs:2": {}
|
||||
},
|
||||
"postCreateCommand": "bash .devcontainer/setup.sh",
|
||||
"hostRequirements": {
|
||||
"cpus": 2,
|
||||
"memory": "4gb",
|
||||
"storage": "32gb"
|
||||
},
|
||||
"runArgs": [
|
||||
"--env-file",
|
||||
".devcontainer/devcontainer.env",
|
||||
"--sysctl",
|
||||
"net.ipv6.conf.all.disable_ipv6=1"
|
||||
],
|
||||
"portsAttributes": {
|
||||
"3000": {
|
||||
"label": "Frontend port",
|
||||
"onAutoForward": "silent",
|
||||
"requireLocalPort": true
|
||||
},
|
||||
"7007": {
|
||||
"label": "Backend port",
|
||||
"onAutoForward": "silent",
|
||||
"requireLocalPort": true
|
||||
},
|
||||
"9464": {
|
||||
"onAutoForward": "silent"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"esbenp.prettier-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"Intility.vscode-backstage"
|
||||
],
|
||||
"settings": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact"
|
||||
],
|
||||
"files.eol": "\n",
|
||||
"prettier.endOfLine": "lf",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "explicit",
|
||||
"source.sortMembers": "explicit"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
echo "Installing Backstage dependencies..."
|
||||
|
||||
yarn install
|
||||
export VIRTUAL_ENV=$HOME/venv
|
||||
python3 -m venv $VIRTUAL_ENV
|
||||
export PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
python3 -m pip install mkdocs-techdocs-core
|
||||
|
||||
echo ""
|
||||
echo "╔════════════════════════════════════════════════════════╗ "
|
||||
echo "║ 🚀 Setup Complete! Ready to launch Backstage! ║ "
|
||||
echo "╠════════════════════════════════════════════════════════╣ "
|
||||
echo "║ ║ "
|
||||
echo "║ Open a new terminal and run: ║ "
|
||||
echo "║ ║ "
|
||||
echo "║ yarn start ║ "
|
||||
echo "║ ║ "
|
||||
echo "║ Then access Backstage at: ║ "
|
||||
echo "║ ║ "
|
||||
echo "║ http://localhost:3000 ║ "
|
||||
echo "║ ║ "
|
||||
echo "║ You might need to refresh the page once backend ║ "
|
||||
echo "║ is ready. ║ "
|
||||
echo "║ ║ "
|
||||
echo "║ Happy coding! 🎉 ║ "
|
||||
echo "╚════════════════════════════════════════════════════════╝ "
|
||||
echo ""
|
||||
Reference in New Issue
Block a user