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

[deploy] plan for fling.work ecosystem #19

Open
3 tasks
ortonomy opened this issue Mar 5, 2018 · 6 comments
Open
3 tasks

[deploy] plan for fling.work ecosystem #19

ortonomy opened this issue Mar 5, 2018 · 6 comments

Comments

@ortonomy
Copy link
Owner

ortonomy commented Mar 5, 2018

A deployment plan for fling.work app ecosystem so we can put it through CI on codeship and then deploy to heroku.

Questions:

  1. Do we containerize the whole thing?
  2. Do we need to? How does

heroku organize the following react components

Components of the system

  • postgreSQL db
  • postgraphql node process (as library in express app) running on localhost:3001/graphql
  • worker node process (as single .js script)
  • react.js app
  • nginx to serve front-end, and direct to api

DoD

@Jskobos
Copy link
Collaborator

Jskobos commented Mar 5, 2018

Containers or no, sounds like it would be worth it to start on some kind of CI pipeline. e.g. Travis can run every time a merge to master is made, run the test suites, run a build pipeline with Babel (Gulp? Webpack?), then either rsync the resulting build to the server or else containerize it, push it to Docker Hub, and then the server(s) and/or any developers can pull and run the new containers.

@ortonomy
Copy link
Owner Author

ortonomy commented Mar 5, 2018

Yeah, I agree. Coderbunker has a codeship team which we can use, so thinking of using that as CI.

The react app I think comes with a build step already built in, so we just then need to rsync or ssh the content to whatever server.

Once you've containerized it, do we need to put it on docker hub, or can we copy the new containers directly the server? What does docker hub get us?

@cwkeam
Copy link
Collaborator

cwkeam commented Mar 5, 2018

What I am familiar with is saving the script that creates the container, rsync-ing the script to the server, and running the script in the server to build the container there. You would want a way to access the image first, which could be done using docker hub or by running a script that builds it.

screen shot 2018-03-05 at 11 12 24 pm

What I usually do is having a script that, by running it, rsyncs all the content in the local computer to the server. Then I would manually stop the currently running container then run the script that creates the container, updating whatever content the server is serving.

@Jskobos
Copy link
Collaborator

Jskobos commented Mar 5, 2018 via email

@cwkeam
Copy link
Collaborator

cwkeam commented Mar 5, 2018

But don't you pull Docker images, not containers, from Docker Hub? Same case for building it from a Dockerfile. I wasn't talking about building the image from a Dockerfile from the remote server, but rather having an existing image (Docker Hub would be convenient) and containerizing whatever would be there on the server that we need.

How it's one thing to have a Docker image in Docker Hub: https://hub.docker.com/r/jupyter/datascience-notebook/

But another thing to build a container in it:
docker run -it --rm -p 8888:8888 jupyter/datascience-notebook

Especially in my example, it's actually more quite flexible because the volume is specified in the script that builds the container, not in the Dockerfile, attaching it to the container, not the image. That would make it so that we use the same image every time that gives us our ability to use PostgreSQL, Node.js, and more, but just stop and re-run the script that builds the container every time we make a merge to master, instead of rebuilding the image every time (this would take ages).

@Jskobos
Copy link
Collaborator

Jskobos commented Mar 5, 2018 via email

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

3 participants