adjusted devcontainer to improve performance on linux / wsl because binding windows fs was quite unusable as performance was really bad

This commit is contained in:
2024-12-31 13:37:01 +00:00
parent b0a015eb61
commit 31ab45c9ab
110 changed files with 30 additions and 28 deletions
Regular → Executable
View File
Regular → Executable
+3 -1
View File
@@ -28,9 +28,11 @@
"postCreateCommand": "./.devcontainer/setup.sh",
"remoteUser": "vscode",
"updateRemoteUserUID": true,
//"workspaceMount": "",
//"workspaceFolder": "/workspaces",
"mounts": [
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock",
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh-host,type=bind,consistency=cached"
//"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
]
}
Regular → Executable
+26 -15
View File
@@ -3,33 +3,44 @@
# Frontend setup
if [ -d "frontend-react" ]; then
echo "Setting up frontend-react..."
cd frontend-react
#npm install
deno install --allow-scripts
cd ..
(
cd frontend-react
# npm install
deno install --allow-scripts
) &
else
echo "frontend-react directory not found, skipping..."
fi
# Dart backend setup
if [ -d "backend_dart" ]; then
echo "Setting up backend_dart..."
cd backend_dart
dart pub get
cd ..
if [ -d "backend-dart" ]; then
echo "Setting up backend-dart..."
(
cd backend-dart
dart pub get
) &
else
echo "backend_dart directory not found, skipping..."
echo "backend-dart directory not found, skipping..."
fi
# Go backend setup
if [ -d "backend-go" ]; then
echo "Setting up backend-go..."
cd backend-go
go mod tidy
cd ..
(
cd backend-go
go mod tidy
) &
else
echo "backend-go directory not found, skipping..."
fi
sudo chmod 600 /home/vscode/.ssh/* && sudo chown $USER:$USER /home/vscode/.ssh/*
#git config --global user.name 'Jean Avril' && git config --global user.email 'jean@jeanavril.com'
# Wait for all parallel processes to finish
wait
echo "Copying ssh keys"
sudo bash -c "rsync -a /home/$USER/.ssh-host/* /home/$USER/.ssh/"
echo "Setting permissions on ssh keys"
sudo chmod 600 /home/$USER/.ssh/* && sudo chown $USER:$USER /home/$USER/.ssh/*
# git config --global user.name 'Jean Avril' && git config --global user.email 'jean@jeanavril.com'
echo "Setup completed!"