Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info on README about how to run from source, how to upgrade #621

Merged
merged 2 commits into from Sep 25, 2016

Conversation

astorije
Copy link
Member

How to run from source and how to upgrade are 2 extremely common things asked on the IRC channel. Hopefully this is going to make things a bit more clear.

This closes #298.
Also, this aims to replace #614 and and #616, so I'd be happy to have feedback from @metsjeesus!

@astorije astorije added Type: Feature Tickets that describe a desired feature or PRs that add them to the project. Type: Documentation Lack of documentation, improvement suggestion, or PRs that address these. labels Sep 20, 2016
@astorije astorije changed the title Astorije/298 run from source Add info on README about how to run from source, how to upgrade Sep 20, 2016
## Usage

When the install is complete, go ahead and run this in your terminal:
When install is complete, run:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should stay as "When the install", alternatively you could use "When installation is..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, addressed, thanks!

```
```sh
git clone https://github.com/thelounge/lounge.git
cd lounge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They may clone into a different directory, maybe cd path/to/lounge?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If command run is git clone https://github.com/thelounge/lounge.git, then the new directory is going to be lounge in the current one, so running these 2 commands altogether should always be good.
If people decide to run git clone https://github.com/thelounge/lounge.git my-custom-dir, I believe them to be advanced enough to adapt the cd to their needs 😅.

Idea is by default you can just copy and paste these in a terminal and it should work as is.

@xPaw
Copy link
Member

xPaw commented Sep 20, 2016

also the npm install needs to account for installing dev dependencies (If your npm env is prod, it won't install them, and the build will fail).

@astorije
Copy link
Member Author

also the npm install needs to account for installing dev dependencies (If your npm env is prod, it won't install them, and the build will fail).

@xPaw, as in, export NODE_ENV=production being set system-wide? Just trying to understand, when can this be an issue? As in, when is such env being set? (I know it's the case for our current Dockerfile, but it's not following these instructions anyway)

@xPaw
Copy link
Member

xPaw commented Sep 20, 2016

That would be one of the cases, yes. I remember someone having this issue on irc.

@astorije
Copy link
Member Author

To be honest, I don't expect someone running installs from source to have their Node environment manually set up to production and being stuck because they don't have the development dependencies...

That seems like a specific scenario that I wouldn't want to worry about. Plus, running this on a prod machine, they need to realize that it should be done cautiously.

Also, "To run from source, run npm install && npm start" is kind of the de facto standard when it comes to Node packages. I expect they would have the same issue whatever they install from source.
@xPaw, mind leaving this as is and see if that issue arises again on the channel and/or GitHub issues? I am tempted to say it could be misconfiguration or miscomprehension in most cases.

@xPaw
Copy link
Member

xPaw commented Sep 20, 2016

This can be an issue on certain services: https://devcenter.heroku.com/changelog-items/688

@astorije
Copy link
Member Author

Then I still think people should be aware that running from source is not a good idea for production, and Heroku redirects them to https://devcenter.heroku.com/articles/nodejs-support#runtime-behavior.
Still believe we should do NODE_ENV=development npm install instead?
I don't have a strong opinion, I'm just puzzled (also, our Heroku doc does do simply npm install so we might not even have a choice, sigh...).

Run this in a terminal to install (or upgrade) the latest stable release from
[npm](https://www.npmjs.com/):

```sh
sudo npm install -g thelounge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well remove sudo and mention the need for root privileges on certain setups?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Most often, people will document [sudo] npm install -g thelounge to indicate reader may need sudo or not depending on system. If this is not the first reader installs something on their machine, and it's extremely likely, they'll know what to do.
Will update this accordingly, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This is already on the badge and at the top of the page, on GitHub UI, as well as in 2 places in npm.
@astorije astorije merged commit 6092ac9 into master Sep 25, 2016
@astorije astorije deleted the astorije/298-run-from-source branch September 25, 2016 04:17
@astorije astorije modified the milestones: Next Release, 2.0.1 Sep 25, 2016
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
…-source

Add info on README about how to run from source, how to upgrade
@xPaw xPaw removed their assignment Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Lack of documentation, improvement suggestion, or PRs that address these. Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify readme with instructions on how to run from git
4 participants