indivisible icon indicating copy to clipboard operation
indivisible copied to clipboard

Setup docker container and scripts to get started

Open pghosh opened this issue 7 years ago • 10 comments

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

  1. Docker container
  2. Setup scripts

pghosh avatar Mar 03 '17 22:03 pghosh

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

shreyaskarnik avatar Mar 13 '17 01:03 shreyaskarnik

@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.

pghosh avatar Mar 13 '17 19:03 pghosh

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 avatar Mar 14 '17 02:03 WanderingStar

Python 3?

WanderingStar avatar Mar 14 '17 02:03 WanderingStar

@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

pghosh avatar Mar 15 '17 03:03 pghosh

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.

WanderingStar avatar Mar 15 '17 13:03 WanderingStar

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

bonfiam avatar Mar 18 '17 22:03 bonfiam

ok! I will check internal-displacement.

pghosh avatar Mar 19 '17 05:03 pghosh

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 avatar Mar 20 '17 04:03 WanderingStar

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.

WanderingStar avatar Mar 21 '17 02:03 WanderingStar