feat: adding config for codespaces
This commit is contained in:
parent
2053ae3bca
commit
f51e0ef35f
4 changed files with 33 additions and 0 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
|
|
@ -17,6 +17,7 @@
|
|||
"build:server": "node ./esbuild.js build",
|
||||
"build:next": "next build",
|
||||
"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: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:14",
|
||||
|
|
Loading…
Add table
Reference in a new issue