forked from sahana/eden
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sahana#1002 from lifeeth/Dockerfile
Added development Dockerfile
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|