refactor: Update Copilot configuration for local development

This commit is contained in:
Simon Larsen 2024-07-08 12:51:27 +01:00
parent e4bf81fcc1
commit f53b314b59
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
3 changed files with 62 additions and 0 deletions

47
.bash_profile Normal file
View File

@ -0,0 +1,47 @@
# These are aliases that will make your life simple when you're building OneUptime
# Make directory and change directory at the same time.
mkcdir ()
{
mkdir -p -- "$1" &&
cd -P -- "$1"
}
alias g="git"
alias k="kubectl"
# Docker aliases
alias d="docker"
alias dc="docker compose"
alias dcu="docker compose up"
alias dcd="docker compose down"
# Node aliases
alias n="npm"
# Rust aliases
alias c="cargo"
alias cb="cargo build"
alias cr="cargo run"
# OneUptime Specific Aliases
# --------------------------
alias nrd="npm run dev"
alias nrl="npm run logs"
alias nrb="npm run build"
alias nrfb="npm run foce-build"
alias nrps="npm run ps-dev"
# OneUptime Copilot
alias nrfbc="npm run force-build-copilot"
alias nrdc="npm run dev-copilot"
alias nrlc="npm run logs-copilot"
alias nrbc="npm run build-copilot"
# OneUptime LLM Server
alias nrfbl="npm run force-build-llm"
alias nrdl="npm run dev-llm"
alias nrll="npm run logs-llm"
alias nrbl="npm run build-llm"

14
.vscode/launch.json vendored
View File

@ -147,6 +147,20 @@
"restart": true, "restart": true,
"autoAttachChildProcesses": true "autoAttachChildProcesses": true
}, },
{
"address": "127.0.0.1",
"localRoot": "${workspaceFolder}/Realtime",
"name": "Copilot: Debug with Docker",
"port": 9985,
"remoteRoot": "/usr/src/app",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"restart": true,
"autoAttachChildProcesses": true
},
{ {
"address": "127.0.0.1", "address": "127.0.0.1",
"localRoot": "${workspaceFolder}/Workers", "localRoot": "${workspaceFolder}/Workers",

View File

@ -2,6 +2,7 @@ services:
copilot: copilot:
volumes: volumes:
- ${COPILOT_REPOSITORY_LOCAL_PATH}:/repository
- ./Copilot:/usr/src/app - ./Copilot:/usr/src/app
# Use node modules of the container and not host system. # Use node modules of the container and not host system.
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder # https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder