uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

Devcontainer for VS Code

Open patrickhafner opened this issue 2 years ago • 5 comments

Description

This branch contains nodejs devcontainer for VS code. Developers using VS Code can run local devcontainer for testing/running.

After opening project in devcontainer run this in terminal to start kuma: node server/server.js

Easy to run with VS Code:

  • Clone project

  • After opening in vs code, user is promted to open in devcontainer (alternative: ctrl/cmd + shift + P) Reopen in container

  • Run from terminal in devcontainer (Terminal -> New Terminal): node server/server.js

  • Develop / Enjoy!

Type of change

Please delete any options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Other
  • This change requires a documentation update - maybe? But it runs without documentation (vs code asks user to run project in remote container)

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I ran ESLint and other linters for modified files
  • [x] I have performed a self-review of my own code and tested it
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [ ] My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

grafik

patrickhafner avatar Feb 26 '22 03:02 patrickhafner

FYI the setup command is not used for development. The user may be unable to build the frontend as it does not install development dependencies.

chakflying avatar Feb 26 '22 10:02 chakflying

npm run setup is called once after starting the devcontainer in vs code. See .devcontainer/devcontainer.json (postCreateCommand).

Do you have issues about that?

Edit: Maybe is better to change to postStartCommand?

patrickhafner avatar Feb 26 '22 11:02 patrickhafner

Just have a quick look. As @chakflying said, npm run setup is not used for development, because it only downloads pre-built files and does not include dev dependencies.

Please read CONTRIBUTING.md for how to setup a dev environment.

https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

  • Install dependencies
  • How to start the Backend Dev Server
  • How to start the Frontend Dev Server

louislam avatar Apr 14 '22 01:04 louislam

Devcontainer support should also work for GitHub Codespaces which will be great as well for folks that can leverage it 🙌

GrantBirki avatar Jul 25 '22 03:07 GrantBirki

We are clearing up our old Pull Requests and yours has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] avatar Dec 05 '22 12:12 github-actions[bot]

Devcontainer support should also work for GitHub Codespaces which will be great as well for folks that can leverage it 🙌

Closed as I added support for GitHub Codespaces.

louislam avatar Jul 17 '23 06:07 louislam