more ghaction fixes
This commit is contained in:
parent
c33fd1c2df
commit
404da582fe
4 changed files with 15 additions and 8 deletions
|
|
@ -7,12 +7,13 @@
|
||||||
"mounts": [
|
"mounts": [
|
||||||
"source=${localWorkspaceFolder}/.devcontainer/start.sh,target=/start-lnbits.sh,type=bind",
|
"source=${localWorkspaceFolder}/.devcontainer/start.sh,target=/start-lnbits.sh,type=bind",
|
||||||
"source=${localWorkspaceFolder}/.devcontainer/setup.sh,target=/setup.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"
|
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
|
||||||
],
|
],
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"IS_DEV_CONTAINER": "true"
|
"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",
|
"postStartCommand": "/bin/bash /start-lnbits.sh",
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
|
|
|
||||||
10
.devcontainer/pre-setup.sh
Normal file
10
.devcontainer/pre-setup.sh
Normal 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
|
||||||
|
|
@ -1,14 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo $PYTHONPATH
|
echo $PYTHONPATH
|
||||||
|
set -e
|
||||||
CONTAINER_WORKSPACE_FOLDER=$1
|
CONTAINER_WORKSPACE_FOLDER=$1
|
||||||
cd $CONTAINER_WORKSPACE_FOLDER
|
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
|
cd $HOME
|
||||||
echo $PWD
|
echo $PWD
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ docker run --name=lnbits_nwcprovider_ext_lnbits_test \
|
||||||
-v ${PWD}/../../:/nwcprovider \
|
-v ${PWD}/../../:/nwcprovider \
|
||||||
-v ${PWD}/../../.devcontainer/start.sh:/start-lnbits.sh:ro \
|
-v ${PWD}/../../.devcontainer/start.sh:/start-lnbits.sh:ro \
|
||||||
-v ${PWD}/../../.devcontainer/setup.sh:/setup.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"
|
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
|
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 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 "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 -"
|
docker exec --user $id:$gid lnbits_nwcprovider_ext_lnbits_test bash -c "curl -sSL https://install.python-poetry.org | python3 -"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue