mirror of
https://github.com/Hestia-Homes/insight.git
synced 2026-06-08 11:17:25 +00:00
basic devcontainer all set up for frontend and backend
This commit is contained in:
parent
74eaa15cf9
commit
840cec8907
1 changed files with 21 additions and 20 deletions
|
|
@ -1,27 +1,28 @@
|
|||
# #!/bin/bash
|
||||
# poetry install;
|
||||
#!/bin/bash
|
||||
cd frontend && npm install;
|
||||
cd .. && cd backend && poetry install;
|
||||
|
||||
# # Get the Poetry virtual environment path
|
||||
# VENV_PATH=$(poetry env info --path 2>/dev/null)
|
||||
# Get the Poetry virtual environment path
|
||||
VENV_PATH=$(poetry env info --path 2>/dev/null)
|
||||
|
||||
# if [ -z "$VENV_PATH" ]; then
|
||||
# echo "No Poetry environment found. Did you run 'poetry install'?"
|
||||
# exit 1
|
||||
# fi
|
||||
if [ -z "$VENV_PATH" ]; then
|
||||
echo "No Poetry environment found. Did you run 'poetry install'?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# # Ensure VS Code settings directory exists
|
||||
# SETTINGS_DIR="/home/vscode/.vscode-server/data/Machine"
|
||||
# SETTINGS_FILE="$SETTINGS_DIR/settings.json"
|
||||
# Ensure VS Code settings directory exists
|
||||
SETTINGS_DIR="/home/vscode/.vscode-server/data/Machine"
|
||||
SETTINGS_FILE="$SETTINGS_DIR/settings.json"
|
||||
|
||||
# mkdir -p "$SETTINGS_DIR"
|
||||
mkdir -p "$SETTINGS_DIR"
|
||||
|
||||
# # If settings.json doesn't exist, create a default one
|
||||
# if [ ! -f "$SETTINGS_FILE" ]; then
|
||||
# echo "{}" > "$SETTINGS_FILE"
|
||||
# fi
|
||||
# If settings.json doesn't exist, create a default one
|
||||
if [ ! -f "$SETTINGS_FILE" ]; then
|
||||
echo "{}" > "$SETTINGS_FILE"
|
||||
fi
|
||||
|
||||
# # Update VS Code settings to use the Poetry virtual environment
|
||||
# jq --arg venv "$VENV_PATH/bin/python" '.["python.defaultInterpreterPath"] = $venv' \
|
||||
# "$SETTINGS_FILE" > "$SETTINGS_FILE.tmp" && mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
|
||||
# Update VS Code settings to use the Poetry virtual environment
|
||||
jq --arg venv "$VENV_PATH/bin/python" '.["python.defaultInterpreterPath"] = $venv' \
|
||||
"$SETTINGS_FILE" > "$SETTINGS_FILE.tmp" && mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
|
||||
|
||||
# echo "✅ Updated VS Code to use Poetry environment: $VENV_PATH"
|
||||
echo "✅ Updated VS Code to use Poetry environment: $VENV_PATH"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue