Data4Democracy / indivisible

Aggregating call to action sites into a single application.
25 stars 19 forks source link

Setup docker container and scripts to get started #6

Open pghosh opened 7 years ago

pghosh commented 7 years ago

This task is to make the setup for project super simple. we will have

  1. Docker container
  2. Setup scripts
shreyaskarnik commented 7 years ago

@pg happy to contribute on this, do you have specific requirements?

pghosh commented 7 years ago

@shreyu86 The goal for this is to make onboarding as painless as possible. for now I don't see anything specific than what basic conda environment has. Later on we can add to it . A writeup on setup will be really awesome. I would recommend having a separate setup directory for any config etc.

WanderingStar commented 7 years ago

The internal-displacement project has some docker infrastructure set up for python + jupyter (and also PostgreSQL and node). It's ubuntu-based because one of the dependencies had a bunch of OS-package dependencies. It would be great to come up with a general setup that various D4D projects can share.

WanderingStar commented 7 years ago

Python 3?

pghosh commented 7 years ago

@WanderingStar I will just go for python 3. A generic container is a great idea. conda environments usually covers the basic requirements, we will need a few more to launch the MEAN stack

WanderingStar commented 7 years ago

Sounds good. Internal-displacement has an example of using using docker-compose to set up a python backend + Postgres db + node frontend that can talk to each other. I think if we were starting from scratch, we'd structure it slightly differently:

/docker-compose.yml
/backend/Dockerfile
/backend/requirements.txt
/backend/<python code>
/localdb/Dockerfile
/localdb/<init scripts to set up tables>
/frontend/Dockerfile
/frontend/<node code>

As it is currently organized, requirements.txt is at the same level as docker-compose.yml, which doesn't really make sense.

bonfiam commented 7 years ago

Hi, All. Just checking in to see if we have a plan of action on this one?

pghosh commented 7 years ago

ok! I will check internal-displacement.

WanderingStar commented 7 years ago

I just set this up, which I'm hoping can be a common template for various D4D projects: https://github.com/WanderingStar/template It only has they Python side so far, but if it seems useful, I'll work on adding node.

WanderingStar commented 7 years ago

I've added this to the D4D org: https://github.com/Data4Democracy/docker-scaffolding

I added a trivial Node app, but I'm not a node programmer, so input there would be welcome.