louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
60.21k stars 5.38k forks source link

Switching from the Prod Env back to the Dev Env #3546

Closed btmolloy closed 1 year ago

btmolloy commented 1 year ago

⚠️ Please verify that this bug has NOT been raised before.

🛡️ Security Policy

📝 Describe your problem

So this isn't exactly a problem that Ive reached yet, however, I know I will reach it soon. I am currently adding some features of my own to my copy of the kuma code in the Dev Env and when I am done I will run npm run setup in order to switch the environment to Prod. My Issue/Question is when I have switched over to the Prod Env, is there a way to switch back to the Dev environment? I have read the entire wiki for another issue I had and I didn't see anything about this then so any help would be lovely.

📝 Error Message(s) or Log

No response

🐻 Uptime-Kuma Version

1.22.1

💻 Operating System and Arch

Ubuntu 22.04

🌐 Browser

Chrome

🐋 Docker Version

No response

🟩 NodeJS Version

20.5

louislam commented 1 year ago

You should not use npm run setup if you have modified some files, because it will overwrite your modified files. Basically:

For backend: npm run start-server-dev = Dev npm run start-server = Prod

For frontend: npm run start-frontend-dev = Dev npm run build = Build dist files for prod

Read more on how to setup your dev env: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#install-dependencies-for-development

or you can use GitHub codespace now: https://github.com/louislam/uptime-kuma/tree/master/.devcontainer

btmolloy commented 1 year ago

Hi Louis, Thank you so much for the clarification on that. I have two follow up/related questions to this issue, first is there any reason against just keeping my version of Kuma as a Dev Env indefinitely? And if I do keep it as a Dev Env, when Im done configuring my features, am I able to just use PM2 too keep it running in the background without any issues? I apologize for my beginner questions, I am a noobie when it comes to Dev work so any help is appreciated.

CommanderStorm commented 1 year ago
btmolloy commented 1 year ago

@CommanderStorm I see... well maybe Ill close this post and open a new one to discuss the feature I am developing since this is no longer about my issue. In a weird position now because I need to be able to run this as a normal user for my less tech intuitive friends, since I wont be able to maintain it due to personal stuff.

CommanderStorm commented 1 year ago

well maybe Ill close this post

@btmolloy I think you forgot to close this issue ^^

btmolloy commented 1 year ago

Oops my bad