KristerV / heliumpay-budgetweb-backend

2 stars 2 forks source link

Added basic Dockerfile for local dev #1

Closed jschr closed 7 years ago

jschr commented 7 years ago

This PR adds a Dockerfile for local development. There are a couple things I could use your feedback on:

In order to make nodemon work with the docker container I had to put it in legacy watch mode. This seems to be the suggested workaround according to nodemon docs: https://github.com/remy/nodemon#application-isnt-restarting

KristerV commented 7 years ago

So if nodemon doesn't quite work in docker the question is do we need nodemon and/or do we need docker? I would rather have both so my vore is -L :D

KristerV commented 7 years ago

okay so the question I have is whether or not we want to put the frontend in there with it? Ideally front would be a separate server, but right now it's in there together with dashd and backend. Just something to think about, I don't mind working like this for a while.

KristerV commented 7 years ago

Oh actually, could you also add a 1-2-3 on how to start your development environment? So if a new guy comes along s/he can just start the thing with no hassle.

jschr commented 7 years ago

Will send a new PR with an update to readme with how to run the dockerfile.

Regarding the frontend, another option to think about would be to host it as a static website that communicates with the API. This would allow us to separate it from the backend without needing to manage another server (and would be very cheap and scalable). The downside would be SEO since any dynamic pages would not be easily crawable by search engines.

KristerV commented 7 years ago

Yeah I wanted to go the static route, but for privacy reasons the site must also work without JavaScript. So server side rendering is a must. That's why I chose next.js as the framework. It's super flexible, easy to work with and has server-side rendering built in.

jschr commented 7 years ago

Nice! I've been looking for an excuse to try next.js 👍