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

create a docker for the API, another for static assets with Nginx #54

Closed
maxime1992 opened this issue Dec 27, 2017 · 3 comments
Closed
Assignees
Milestone

Comments

@maxime1992
Copy link
Owner

Node is single thread and serving the assets from the backend is really a bad idea.

The refactor of the backend to use Nest doesn't even serve the public folder in production anymore.

Nginx seems well suited for that use case:

  • serve static content
  • let HTTP calls to the api go through
  • let websockets go through
@maxime1992 maxime1992 added this to the v2.1 milestone Dec 27, 2017
@maxime1992 maxime1992 self-assigned this Dec 27, 2017
@maxime1992
Copy link
Owner Author

I did start digging into this and came up with something working.
As I've never used nginx before I'm not sure it's the best way of doing that but I'll open a dedicated PR soon.

@maxime1992
Copy link
Owner Author

I also solved #53 as it's related and it's not handled by nginx!

maxime1992 added a commit that referenced this issue Dec 28, 2017
Split Dockerfile in 2: API and NGINX

Closes #53 #54
maxime1992 added a commit that referenced this issue Dec 28, 2017
Split Dockerfile in 2: API and NGINX

Closes #53 #54
maxime1992 added a commit that referenced this issue Aug 18, 2018
Split Dockerfile in 2: API and NGINX

Closes #53 #54
@maxime1992
Copy link
Owner Author

Closed by #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant