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

Improve how we start and run the app in production #335

Open
reefdog opened this issue Feb 27, 2020 · 2 comments
Open

Improve how we start and run the app in production #335

reefdog opened this issue Feb 27, 2020 · 2 comments
Labels
hosting Concerns hosting environment / deployed services

Comments

@reefdog
Copy link
Collaborator

reefdog commented Feb 27, 2020

We currently fire the app up in production with pm2 start 'yarn start', which may end up creating more processes and daemons than we need in production. E.g., we definitely don't need parcel running (#334), and should probably not be using nodemon either. This should probably just be pm2 start src/server/index.js or something.

Anyway just spit-balling; the point is we're probably not starting our app the right way and this may be the source of some of our pm2 management problems!

@reefdog reefdog added blocked Can't work on yet. (This isn't a pejorative!) hosting Concerns hosting environment / deployed services and removed blocked Can't work on yet. (This isn't a pejorative!) labels Feb 27, 2020
@slifty
Copy link
Contributor

slifty commented Mar 18, 2020

I do think we should probably have it be yarn start or something similarly black-box-expected-to-start-things-properly. However I think yarn start needs fixing as described in #334.

@slifty slifty mentioned this issue Mar 18, 2020
4 tasks
@slifty
Copy link
Contributor

slifty commented Mar 23, 2020

One note: we have a scripts/startup.sh for CD -- it is only being invoked in dev.

We can modify the pm2 script there quite easily. I'd like to tease out our options based on this issue:

  1. Have the script use yarn start (this is status quo)
  2. Modify the script to directly call node
  3. Create a new yarn command yarn start:prod

My concern with 2 is that it creates two places we would have to update if we added startup dependencies, and it's unclear what it accomplishes.

My concern with 3 is that I think it would be identical to the current yarn start.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hosting Concerns hosting environment / deployed services
Projects
None yet
Development

No branches or pull requests

2 participants