Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

[WIP] Add docker development environment #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doodyparizada
Copy link

run docker-compose up and you have a full development environment in docker.

@oryband

There is also an automated build on docker hub: https://hub.docker.com/r/doodyparizada/open-knesset/

@noamelf
Copy link

noamelf commented Nov 17, 2015

So cool!
On Nov 17, 2015 10:19 PM, "Doody Parizada" [email protected] wrote:

run docker-compose up and you have a full development environment in
docker.

@oryband https://github.com/oryband

You can view, comment on, or merge this pull request online at:

#424
Commit Summary

  • Add docker development environment

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#424.

@@ -0,0 +1,39 @@
FROM ubuntu:14.04

MAINTAINER Doody Parizada doody.parizada @ gmail.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAINTAINER Doody Parizada <doody.parizada @ gmail.com>

@oryband
Copy link
Member

oryband commented Nov 18, 2015

sorry for being strict, this is the first introduction to docker in hasadna so we better get this right

@doodyparizada doodyparizada force-pushed the doody/development_docker branch from d95c712 to 99e87de Compare November 23, 2015 17:25
@doodyparizada doodyparizada force-pushed the doody/development_docker branch from 99e87de to 2bb1e11 Compare November 23, 2015 17:29
WORKDIR /opt/database
RUN apt-get install -y wget && \
wget http://oknesset-devdb.s3.amazonaws.com/dev.db.bz2 && \
bzip2 -d dev.db.bz2 && \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • db should be in /opt/knesset - so users can change it
  • download of dev.db should be done only if it doesn't already exist
  • should be done in entrypoint

@habeanf
Copy link
Member

habeanf commented Nov 25, 2015

@oryband While we're here, can we get the docker environment to use postgres instead of sqlite? We've been wanting to be pg-only for a while, its a bit of a headache to support both. I can help with the pg setup next week.

@noamelf
Copy link

noamelf commented Nov 25, 2015

Did you encounter any problems with sqlite?

On Wed, Nov 25, 2015 at 12:01 PM, Amir More [email protected]
wrote:

@oryband https://github.com/oryband While we're here, can we get the
docker environment to use postgres instead of sqlite? We've been wanting to
be pg-only for a while, its a bit of a headache to support both. I can help
with the pg setup next week.


Reply to this email directly or view it on GitHub
#424 (comment).

,Noam Elfanbaum
972-54-555-1680+

@habeanf
Copy link
Member

habeanf commented Nov 25, 2015

It's not that I encountered problems, as much as it requires some code to be written twice, so for some parts of oknesset the developer already needs to install postgres anyhow.
Eventually, we'll want to rely on more of postgres' capabilities for performance/efficiency (e.g. analytic/window functions, non-trivial indexes, partitioning, etc). Historically we enabled sqlite for ease of development and environment setup. If we have a docker setup, we might as well have it run on postgres and save the extra headache.

@noamelf
Copy link

noamelf commented Nov 25, 2015

That's a good example you sent!
Cool, I like the idea.

On Wed, Nov 25, 2015 at 12:40 PM, Amir More [email protected]
wrote:

It's not that I encountered problems, as much as it requires some code to
be written twice
https://github.com/hasadna/Open-Knesset/blob/master/agendas/models.py#L51,
so for some parts of the oknesset the developer already needs to install
postgres anyhow.
Eventually, we'll want to rely on more of postgres' capabilities for
performance/efficiency (e.g. analytic/window functions, non-trivial
indexes, partitioning, etc). Historically we enabled sqlite for ease of
development and environment setup. If we have a docker setup, we might as
well have it run on postgres and save the extra headache.


Reply to this email directly or view it on GitHub
#424 (comment).

,Noam Elfanbaum
972-54-555-1680+

@oryband
Copy link
Member

oryband commented Nov 25, 2015

@habeanf

@oryband While we're here, can we get the docker environment to use postgres instead of sqlite? We've been wanting to be pg-only for a while, its a bit of a headache to support both. I can help with the pg setup next week.

you should probably use a stub postgres docker image, and docker-compose with fixtures. this will allow to connect an ok and postgres images together easily. @doodyparizada can help, i guess.

@@ -0,0 +1,31 @@
FROM ubuntu:14.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not vivid?

-----------

- install docker_ and docker-compose_
- run ``docker-compose up``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single backquotes

@OriHoch OriHoch changed the title Add docker development environment [WIP] Add docker development environment Dec 11, 2015
@OriHoch
Copy link

OriHoch commented Dec 15, 2015

@doodyparizada - I would like to merge it, do you intend to continue working on it sometime soon?

@oryband
Copy link
Member

oryband commented Dec 20, 2015

@doodyparizada ?

@oryband
Copy link
Member

oryband commented Jan 25, 2016

@OriHoch i can help with this as well if you'd like, let's talk today

@OriHoch
Copy link

OriHoch commented Feb 14, 2016

hey, anyone working on this?

If not, @uda - you can take it..

@OriHoch
Copy link

OriHoch commented Feb 14, 2016

this issue might be related to #527

@oryband
Copy link
Member

oryband commented Feb 15, 2016

@OriHoch i'll also be at the hasadna today, feel free to talk to me if you need docker help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants