indivisible
indivisible copied to clipboard
Setup docker container and scripts to get started
This task is to make the setup for project super simple. we will have
- Docker container
- Setup scripts
@pg happy to contribute on this, do you have specific requirements?
@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.
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.
Python 3?
@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
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.
Hi, All. Just checking in to see if we have a plan of action on this one?
ok! I will check internal-displacement.
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.
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.