feat: adding config for codespaces
This commit is contained in:
parent
e921e52934
commit
51ce8e2667
4 changed files with 34 additions and 1 deletions
15
.devcontainer/devcontainer.json
Normal file
15
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node",
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker": {
|
||||||
|
"version": "latest",
|
||||||
|
"moby": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extensions": [
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"ms-vscode.vscode-typescript-next",
|
||||||
|
"waderyan.gitblame"
|
||||||
|
],
|
||||||
|
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"
|
||||||
|
}
|
5
.devcontainer/filewatcher.sh
Executable file
5
.devcontainer/filewatcher.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# We need to change the owner of the files in the app-data folder
|
||||||
|
# if this failes we have to change the permission your self
|
||||||
|
fswatch --event=Created /workspaces/runtipi/app-data/ | \
|
||||||
|
xargs -l1 sh -c 'echo "$1" && sudo chown node "$1" -R' -- &
|
12
.devcontainer/postCreateCommand.sh
Executable file
12
.devcontainer/postCreateCommand.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
echo '{
|
||||||
|
"appsRepoUrl": "https://github.com/meienberger/runtipi-appstore.git/"
|
||||||
|
}' > state/settings.json
|
||||||
|
npm i -g pnpm
|
||||||
|
pnpm i
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install jq fswatch -y
|
||||||
|
mkdir logs
|
||||||
|
mkdir data
|
||||||
|
sudo chown node logs
|
||||||
|
sudo chown node data
|
|
@ -7,6 +7,7 @@
|
||||||
"act:test-install": "act --container-architecture linux/amd64 -j test-install",
|
"act:test-install": "act --container-architecture linux/amd64 -j test-install",
|
||||||
"act:docker": "act --container-architecture linux/amd64 --secret-file github.secrets -j build-images",
|
"act:docker": "act --container-architecture linux/amd64 --secret-file github.secrets -j build-images",
|
||||||
"start:dev": "./scripts/start-dev.sh",
|
"start:dev": "./scripts/start-dev.sh",
|
||||||
|
"start:dev-container": "./.devcontainer/filewatcher.sh && npm run start:dev",
|
||||||
"start:rc": "docker-compose -f docker-compose.rc.yml --env-file .env up --build",
|
"start:rc": "docker-compose -f docker-compose.rc.yml --env-file .env up --build",
|
||||||
"start:prod": "docker-compose -f docker-compose.test.yml --env-file .env up --build",
|
"start:prod": "docker-compose -f docker-compose.test.yml --env-file .env up --build",
|
||||||
"start:pg": "docker run --name test-db -p 5433:5432 -d --rm -e POSTGRES_PASSWORD=postgres postgres",
|
"start:pg": "docker run --name test-db -p 5433:5432 -d --rm -e POSTGRES_PASSWORD=postgres postgres",
|
||||||
|
|
Loading…
Reference in a new issue