mirror of
https://github.com/ublue-os/forge.git
synced 2025-04-12 09:43:44 +03:00
chore(devcontainer): init
for everyone who wants to use it ;)
This commit is contained in:
parent
9b46c072f5
commit
b7d9417abd
76
.devcontainer/devcontainer.json
Normal file
76
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||||
|
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
|
||||||
|
{
|
||||||
|
"name": "ublue-os/forge",
|
||||||
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/base:alpine-3.17",
|
||||||
|
|
||||||
|
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||||
|
"remoteUser": "vscode",
|
||||||
|
// podman needs this
|
||||||
|
"containerUser": "vscode",
|
||||||
|
"runArgs": [
|
||||||
|
// run container as current user
|
||||||
|
"--userns=keep-id",
|
||||||
|
// disable selinux isolation that breaks bind mounts
|
||||||
|
"--security-opt=label=disable"
|
||||||
|
],
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
|
// "features": {},
|
||||||
|
|
||||||
|
// Mounts from host system
|
||||||
|
"mounts": [
|
||||||
|
"source=/run/user/${localEnv:UID:1000}/podman/podman.sock,target=/run/podman/podman.sock,type=bind"
|
||||||
|
],
|
||||||
|
|
||||||
|
// Install DevTools
|
||||||
|
"postCreateCommand": "bash ./.devcontainer/install-dev-tools.sh",
|
||||||
|
// Configure tool-specific properties.
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.profiles.linux": {
|
||||||
|
"zsh": {
|
||||||
|
"path": "zsh",
|
||||||
|
"args": ["-l"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"terminal.integrated.defaultProfile.linux": "zsh",
|
||||||
|
"terminal.integrated.automation.linux": "zsh",
|
||||||
|
"terminal.integrated.automationProfile.linux": { "path": "zsh" },
|
||||||
|
"editor.suggestSelection": "first",
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"cSpell.customDictionaries": {
|
||||||
|
"project-words": {
|
||||||
|
"name": "custom-dictionary",
|
||||||
|
"path": "${workspaceFolder}/.vscode/cspell_custom.txt",
|
||||||
|
"description": "Words used in this project",
|
||||||
|
"addWords": true
|
||||||
|
},
|
||||||
|
"custom": true,
|
||||||
|
"internal-terms": false
|
||||||
|
},
|
||||||
|
"docker.host": "unix:///run/podman/podman.sock",
|
||||||
|
"peacock.affectActivityBar": false,
|
||||||
|
"peacock.affectStatusBar": true,
|
||||||
|
"peacock.affectTitleBar": false,
|
||||||
|
"peacock.surpriseMeOnStartup": false
|
||||||
|
},
|
||||||
|
"extensions": [
|
||||||
|
"bungcip.better-toml",
|
||||||
|
"DavidAnson.vscode-markdownlint",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"GitHub.vscode-pull-request-github",
|
||||||
|
"Gruntfuggly.todo-tree",
|
||||||
|
"kokakiwi.vscode-just",
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"nico-castell.linux-desktop-file",
|
||||||
|
"redhat.vscode-yaml",
|
||||||
|
"shakram02.bash-beautify",
|
||||||
|
"streetsidesoftware.code-spell-checker"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
.devcontainer/forge.code-workspace
Normal file
19
.devcontainer/forge.code-workspace
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": ".."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"workbench.colorCustomizations": {
|
||||||
|
"sash.hoverBorder": "#7cb9e3",
|
||||||
|
"statusBar.background": "#52a2da",
|
||||||
|
"statusBarItem.hoverBackground": "#2c8bcd",
|
||||||
|
"statusBarItem.remoteBackground": "#52a2da",
|
||||||
|
"statusBar.foreground": "#15202b",
|
||||||
|
"statusBarItem.remoteForeground": "#15202b"
|
||||||
|
},
|
||||||
|
"peacock.remoteColor": "#52a2da",
|
||||||
|
"cSpell.enableFiletypes": ["shellscript"]
|
||||||
|
}
|
||||||
|
}
|
47
.devcontainer/install-dev-tools.sh
Normal file
47
.devcontainer/install-dev-tools.sh
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cat <<EOM
|
||||||
|
install-dev-tools.sh
|
||||||
|
=============================================
|
||||||
|
This script customizes the devcontainer setup
|
||||||
|
=============================================
|
||||||
|
EOM
|
||||||
|
# Bash colors
|
||||||
|
RED="\e[31m"
|
||||||
|
YELLOW="\e[33m"
|
||||||
|
GREEN="\e[32m"
|
||||||
|
ENDCOLOR="\e[0m"
|
||||||
|
|
||||||
|
## Update system
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}Updating OS${ENDCOLOR}"
|
||||||
|
echo ""
|
||||||
|
sudo apk update && sudo apk upgrade
|
||||||
|
|
||||||
|
## Install additional tools
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}Installing additional tools${ENDCOLOR}"
|
||||||
|
echo ""
|
||||||
|
sudo apk add git-extras --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||||
|
|
||||||
|
## Install podman remote
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}Installing podman-remote${ENDCOLOR}"
|
||||||
|
echo ""
|
||||||
|
PODMAN_SOURCE=https://github.com/containers/podman/releases/download/v4.4.4/podman-remote-static-linux_amd64.tar.gz
|
||||||
|
PODMAN_TMP=/tmp/podman.tar.gz
|
||||||
|
wget -O $PODMAN_TMP $PODMAN_SOURCE
|
||||||
|
sudo tar -xf $PODMAN_TMP -C /tmp
|
||||||
|
sudo mv /tmp/bin/podman-remote-static-linux_amd64 /usr/bin/podman
|
||||||
|
podman system connection add devcontainer_host unix:///run/podman/podman.sock
|
||||||
|
sudo rm -rf /tmp/bin
|
||||||
|
|
||||||
|
# Add git commit template
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}Configuring git${ENDCOLOR}"
|
||||||
|
echo ""
|
||||||
|
git config --local commit.template .gitmessage
|
||||||
|
|
||||||
|
# Finish
|
||||||
|
echo ""
|
||||||
|
echo -e "${GREEN}Done. Happy coding!${ENDCOLOR}"
|
||||||
|
echo ""
|
0
.gitignore
vendored
Normal file
0
.gitignore
vendored
Normal file
19
.gitmessage
Normal file
19
.gitmessage
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<type>(optional scope): <description>
|
||||||
|
|
||||||
|
[optional body]
|
||||||
|
|
||||||
|
[optional footer(s)]
|
||||||
|
|
||||||
|
####
|
||||||
|
# Allowed <type> values
|
||||||
|
# ---------------------
|
||||||
|
# feat: –> A new feature
|
||||||
|
# fix: –> Fixed a bug
|
||||||
|
# refactor: –> A code change that's not mainly a bug or new feature
|
||||||
|
# docs: –> Documentation only changes
|
||||||
|
# style: –> Changes to styling like white space, formatting, semi-colons)
|
||||||
|
# chore: –> Other changes that don't modify src or test files
|
||||||
|
# ci: –> Changes made to the CI configuration like Travis, Circle, Actions
|
||||||
|
# revert: –> Revert a previous commit
|
||||||
|
# test: –> Add or fix tests
|
||||||
|
####
|
3
.markdownlint.json
Normal file
3
.markdownlint.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"MD024": { "allow_different_nesting": true }
|
||||||
|
}
|
3
.prettierignore
Normal file
3
.prettierignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Created by https://github.com/google-github-actions/release-please-action
|
||||||
|
CHANGELOG.md
|
||||||
|
version.txt
|
3
.prettierrc
Normal file
3
.prettierrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"tabWidth": 2
|
||||||
|
}
|
0
.vscode/cspell_custom.txt
vendored
Normal file
0
.vscode/cspell_custom.txt
vendored
Normal file
39
.vscode/tasks.json
vendored
Normal file
39
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Git: Fetch upstream",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "git fetch upstream",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Git: Merge from upstream",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "git merge --no-ff --no-commit upstream/main",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Git: Delete merged branches",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "git delete-merged-branches",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Git: Prune remote",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "git remote prune origin",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue