-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
Update the readme so we can get started on OkCandidate using Docker. Signed-off-by: Ryan Y <[email protected]>
Ignore the environment variable configuration and security certificates so we can see code changes here, not irrelevant artefacts. Signed-off-by: Ryan Y <[email protected]>
Define an Alpine Linux Node.js + Python image so we can build packages which require node-gyp. Signed-off-by: Ryan Y <[email protected]>
Include an environment variable example file so we can start using development settings, but also allow developers or admins to switch out the settings for production if they need to. Signed-off-by: Ryan Y <[email protected]>
Create a certificate generation script so we can have local development certificates to test OkCandidate over https with. Signed-off-by: Ryan Y <[email protected]>
Dockerise OkCandidate with a web server, application server and a database so we can get this system as close as we can to a production system. Signed-off-by: Ryan Y <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start.
Look at the old docker-compose.yml for how to setup psql. It should be setting its password on startup, and initializing the db when there isn't any data.
The node design could be better. Right now it'll run npm install on every start, but really, you want that happening during build, not start. See my example node repo for how to solve this. I'm also not a big fan of the npm installs being in a volume, so also refer to my example on how to just install npm dependencies in an upstream folder rather than downstream volume https://github.com/BretFisher/node-docker-good-defaults
Also, we should put these images in the docker hub org like we do for the rest. give me hub accounts in slack or here and I'll add. https://hub.docker.com/u/code4hr/
I feel like there's a way this can all work in a single "docker-compose up" after a git clone for local dev without the "setup steps" but we'll get there :).
After this we can work on adding the deploy options to compose for production.
Nice work.
Merge remote-tracking branch 'upstream/develop' into docker to integrate the Docker setup with the latest implementation. Signed-off-by: Ryan Y <[email protected]>
I pulled and tried this the other day, would the default env allow postgres to bootstrap correctly? I was getting |
Merge remote-tracking branch 'upstream/develop' into docker to integrate the Docker setup with the latest implementation. Signed-off-by: Ryan Y <[email protected]>
Use the PostgreSQL environment variables in the Docker image so we can configure PostgreSQL and Trails to automatically create the database schema needed. Signed-off-by: Ryan Y <[email protected]>
Ok so noticing auto rebuilding doesn't happen with frontend weird. |
Hey @stanzheng just saw this, what's going on? Something like gulp watch isn't working? Or the dist didn't get moved over or something? EDIT: Just tried locally, edited a component and the changes showed up in the panel. Did you mean something else? EDIT EDIT: I do see a possible server render which doesn't show the changes, but immediately after that if you refresh the changes do show up: Then refreshing: |
I'm seeing it reload fine on main routes after webpack rebuilds (may flash a bit) but |
This pull request implements a Docker setup for OkCandidate, including a web server (nginx) allowing access over ports 80 and (preferring) 443, the Node.js application server and a PostgreSQL database instance. It addresses #60.
Uses the main concept for node-gyp compilation from nodejs/docker-node#282.