Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use node18 by default #2

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dockerComposeFile": "./docker-compose.yml",
"service": "frappe",
"workspaceFolder": "/workspace/frappe-bench",
"postCreateCommand": "bash scripts/init.sh",
"postCreateCommand": "bash /workspace/scripts/init.sh",
"shutdownAction": "stopCompose",
"extensions": [
"ms-python.python",
Expand Down
12 changes: 11 additions & 1 deletion scripts/init.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#!bin/bash

set -e

if [[ -f "/workspaces/frappe_codespace/frappe-bench/apps/frappe" ]]
then
echo "Bench already exists, skipping init"
exit 0
fi

rm -rf /workspaces/frappe_codespace/.git
rm -rf /workspaces/frappe_codespace/.git

source /home/frappe/.nvm/nvm.sh
nvm alias default 18
nvm use 18

echo "nvm use 18" >> ~/.bashrc
cd /workspace

bench init \
--ignore-exist \
Expand All @@ -24,6 +33,7 @@ bench set-redis-socketio-host redis-socketio:6379
# Remove redis from Procfile
sed -i '/redis/d' ./Procfile


bench new-site dev.localhost \
--mariadb-root-password 123 \
--admin-password admin \
Expand Down