Skip to content

Commit

Permalink
Added development Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeeth committed Dec 20, 2014
1 parent 5d63a84 commit 4b21e6b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:14.10

RUN apt-get update && apt-get install -y build-essential unzip curl python-pip python-dev python-matplotlib python-lxml \
python-numpy python-dateutil python-gdal python-yaml python-serial python-xlwt python-shapely python-pil python-gdal \
python-reportlab python-reportlab-accel python-tweepy python-xlrd python-pyth python-boto ansible

RUN pip install selenium\>=2.23.0 sunburnt\>=0.6 TwitterSearch\>=0.78.4 requests\>=2.3.0

RUN curl -o web2py.zip https://codeload.github.com/web2py/web2py/zip/R-2.9.11 && unzip web2py.zip && mv web2py-R-2.9.11 /home/web2py && rm web2py.zip

ADD . /home/web2py/applications/eden

RUN cp /home/web2py/applications/eden/private/templates/000_config.py /home/web2py/applications/eden/models/000_config.py && sed -i 's|EDITING_CONFIG_FILE = False|EDITING_CONFIG_FILE = True|' /home/web2py/applications/eden/models/000_config.py

CMD python /home/web2py/web2py.py -i 0.0.0.0 -p 8000 -a eden
25 changes: 25 additions & 0 deletions README_DOCKERFILE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# What does this Dockerfile do?
This Dockerfile has all the dependencies needed to run Sahana Eden for developing and demos.

1. You can try out Sahana Eden by running the following - Sahana Eden will be running on http://localhost:8000/eden/

```
docker run -p 8000:8000 sahana/eden
```

2. You can develop with this dockerfile by running the following - this shares your eden directory with the container. Replace <path_to_eden_repo> with the path to your local eden repo.

```
docker run -v <path_to_eden_repo>:/home/web2py/ application/eden -p 8000:8000 sahana/eden
```

# Building the Dockerfile

You can build the dockerfile by running the following from inside the eden directory.

```
docker build -t sahana/eden .
```

**NOTE:** This Dockerfile runs the web2py development webserver. Production deployments will need to modify this Dockerfile with relevant nginx and uwsgi additions.

0 comments on commit 4b21e6b

Please sign in to comment.