more ghaction fixes

This commit is contained in:
Riccardo Balbo 2025-02-22 13:47:02 +01:00
commit 404da582fe
4 changed files with 15 additions and 8 deletions

View file

@ -7,12 +7,13 @@
"mounts": [
"source=${localWorkspaceFolder}/.devcontainer/start.sh,target=/start-lnbits.sh,type=bind",
"source=${localWorkspaceFolder}/.devcontainer/setup.sh,target=/setup.sh,type=bind",
"source=${localWorkspaceFolder}/.devcontainer/pre-setup.sh,target=/pre-setup.sh,type=bind",
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"containerEnv": {
"IS_DEV_CONTAINER": "true"
},
"postCreateCommand": "/bin/bash /setup.sh ${containerWorkspaceFolder}",
"postCreateCommand": "/bin/bash /pre-setup.sh && /bin/bash /setup.sh ${containerWorkspaceFolder}",
"postStartCommand": "/bin/bash /start-lnbits.sh",
"customizations": {
"vscode": {

View file

@ -0,0 +1,10 @@
#!/bin/bash
set -e
sudo apt update -y
sudo apt install -y curl
sudo apt-get install -y docker.io
curl -fsSL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh
sudo bash /tmp/nodesource_setup.sh
sudo apt-get install -y nodejs

View file

@ -1,14 +1,8 @@
#!/bin/bash
echo $PYTHONPATH
set -e
CONTAINER_WORKSPACE_FOLDER=$1
cd $CONTAINER_WORKSPACE_FOLDER
sudo apt update -y
sudo apt install -y curl
sudo apt-get install -y docker.io
curl -fsSL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh
sudo bash /tmp/nodesource_setup.sh
sudo apt-get install -y nodejs
cd $HOME
echo $PWD

View file

@ -42,6 +42,7 @@ docker run --name=lnbits_nwcprovider_ext_lnbits_test \
-v ${PWD}/../../:/nwcprovider \
-v ${PWD}/../../.devcontainer/start.sh:/start-lnbits.sh:ro \
-v ${PWD}/../../.devcontainer/setup.sh:/setup.sh:ro \
-v ${PWD}/../../.devcontainer/pre-setup.sh:/pre-setup.sh:ro \
mcr.microsoft.com/devcontainers/python:1-3.12 bash -c "while true; do sleep 1000; done"
docker network create lnbits_nwcprovider_ext_test_network || true
@ -49,6 +50,7 @@ docker network connect lnbits_nwcprovider_ext_test_network lnbits_nwcprovider_ex
docker network connect lnbits_nwcprovider_ext_test_network lnbits_nwcprovider_ext_lnbits_test --alias lnbits|| true
docker exec -u root lnbits_nwcprovider_ext_lnbits_test bash -c "id -u $id &>/dev/null || useradd -m -u $id tester"
docker exec -u root lnbits_nwcprovider_ext_lnbits_test bash -c "bash /pre-setup.sh"
docker exec --user $id:$gid lnbits_nwcprovider_ext_lnbits_test bash -c "curl -sSL https://install.python-poetry.org | python3 -"
set +e