creativecommons / legaldb

CC Legal Database: curated repository of Case Law and Scholarship data from around the world in a Django based website.

Home Page:https://LegalDB.CreativeCommons.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding Docker and Docker Compose Support

pratikdaigavane opened this issue · comments

Problem

Currently, to set up the development environment, having python 3.7 and starting a separate Postgres server is required.

Description

This process can be automated by creating a docker image for Django server based on python 3.7 and using Postgres docker image. Then these images can be managed by docker-compose, hence requiring only a docker-compose up to start the server.

Further for Django server, a pipeline to run linter and to build the docker image can also be created using GitHub actions

Implementation

  • I would be interested in implementing this feature.

I was thinking the same, adding a docker-compose file could speed up development for newcomers and is good way to have the environment configurations documented. @pratikdaigavane If you want to take the lead here, I'll gladly review the pull request.
Any suggestions for improvement are welcome!

@krysal sure, I will take this issue!

@krysal is it okay if I move all Django and Pipenv files inside a subfolder? this will reduce the build context and hence the size of the docker image will be less.

@krysal Should I create a new PR for adding Docker Support with new webpack setup?

@krysal is it okay if I move all Django and Pipenv files inside a subfolder? this will reduce the build context and hence the size of the docker image will be less.

@pratikdaigavane No, the contents of repo are less than a mebibyte. Moving the files do to size is not worth it. if there an an organization that works well for Heroku (primary deployment target) and also improves developer experience, please do propose it.