Skip to content

Commit

Permalink
Fix build steps for @guicoelho
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio committed Sep 4, 2016
1 parent 22c56f8 commit f214d58
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN apt-get update
# Install python
RUN apt-get install -y gcc make python-dev libxml2-dev libxslt-dev gzip
RUN curl -s https://bootstrap.pypa.io/get-pip.py | python
RUN apt-get install -y maven
# Install pygrib dependencies manually
RUN apt-get install -y libgrib-api-dev && pip install numpy==1.10.1 pyproj==1.9.4
EXPOSE 8000
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: server

install:
install: install-grib2json
pip install -r requirements.txt
pip install honcho==0.7.1

Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,20 @@ You can also see a list of missing informations displayed as warnings in the dev

![image](https://cloud.githubusercontent.com/assets/1655848/16256617/9c5872fc-3853-11e6-8c84-f562679086f3.png)

To get started, clone or [Fork](https://help.github.com/articles/fork-a-repo/) the repository, and install all requirements:
To get started, clone or [fork](https://help.github.com/articles/fork-a-repo/) the repository, and install all requirements:

```
Make install
```

You might need to install the [GRIB API](https://software.ecmwf.int/wiki/display/GRIB/GRIB+API+CMake+installation). On Mac OS, you can simply `brew install grib-api`.


Provided you have mongodb installed and running, you can run the full system using
```
Make server
```

If you have Docker, you can just run `docker-compose up` instead. Head over to [http://localhost:8000/](http://localhost:8000/) and you should see the map!

Once you're done doing your changes, submit a [Pull Request](https://help.github.com/articles/using-pull-requests/) to get them integrated.
Once you're done doing your changes, submit a [pull request](https://help.github.com/articles/using-pull-requests/) to get them integrated.
4 changes: 2 additions & 2 deletions backend/parsers/wind.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def fetch_wind():
subprocess.check_call([
'java',
'-Xmx512M',
'-jar', 'grib2json/target/grib2json-0.8.0-SNAPSHOT/lib/grib2json-0.8.0-SNAPSHOT.jar',
'-jar', 'grib2json/grib2json-0.8.0-SNAPSHOT/lib/grib2json-0.8.0-SNAPSHOT.jar',
'-d', '-n', '-c', '-o',
'data/wind_before.json', 'wind.grb2'], shell=False)

Expand All @@ -57,7 +57,7 @@ def fetch_wind():
subprocess.check_call([
'java',
'-Xmx512M',
'-jar', 'grib2json/target/grib2json-0.8.0-SNAPSHOT/lib/grib2json-0.8.0-SNAPSHOT.jar',
'-jar', 'grib2json/grib2json-0.8.0-SNAPSHOT/lib/grib2json-0.8.0-SNAPSHOT.jar',
'-d', '-n', '-c', '-o',
'data/wind_after.json', 'wind.grb2'], shell=False)

Expand Down
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ services:
file: common.yml
service: web
ports: ['8000:8000']
volumes: ['.:/home/']
volumes:
- './app:/home/app'
- './vendor:/home/vendor'
- './backend:/home/backend'
- './server.py:/home/server.py'
- './style.css:/home/style.css'
- './index.html:/home/index.html'
environment: [ENV=development, 'MONGO_URL=mongodb://mongo:27017']
depends_on: [mongo]
mongo:
Expand Down

0 comments on commit f214d58

Please sign in to comment.