Skip to content
This repository has been archived by the owner on Feb 28, 2018. It is now read-only.

Commit

Permalink
Merge pull request #70 from gomex/master
Browse files Browse the repository at this point in the history
Solving problem with migrating data to postgres
  • Loading branch information
cuducos authored Dec 17, 2016
2 parents b0768a9 + d8493d6 commit 85164e1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ COPY .env /code/.env
COPY manage.py /code/manage.py
COPY jarbas /code/jarbas
WORKDIR /code
RUN python manage.py migrate
RUN python manage.py ceapdatasets
RUN echo "America/Sao_Paulo" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
VOLUME /code/staticfiles
CMD ["gunicorn", "jarbas.wsgi:application", "--reload", "--bind", "0.0.0.0:8001", "--workers", "4"]
4 changes: 3 additions & 1 deletion Dockerfile-elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ COPY elm-package.json elm-package.json
COPY package.json package.json
COPY gulpfile.js gulpfile.js
COPY jarbas jarbas
COPY contrib/copyassets.sh copyassets.sh
RUN chmod +x copyassets.sh
RUN npm install
VOLUME /assets
RUN npm run assets
CMD ["cp", "-r", "jarbas/frontend/static/*", "/assets"]
CMD ["./copyassets.sh"]
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
run.jarbas:
docker-compose up -d
docker-compose up -d --build
docker-compose run --rm jarbas python manage.py migrate
docker-compose run --rm jarbas python manage.py ceapdatasets

collectstatic: run.jarbas
docker-compose run --rm jarbas python manage.py collectstatic --no-input
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Jarbas is in charge of making data from [CEAP](https://github.com/datasciencebr/
1. [Installing](#installing)
1. [Using Docker](#using-docker)
1. [Local install](#local-install)

## JSON API endpoints

### Reimbursement
Expand Down Expand Up @@ -128,10 +128,12 @@ There is also a [tapioca-wrapper](https://github.com/vintasoftware/tapioca-wrapp

### Using Docker

If you have [Docker](https://docs.docker.com/engine/installation/) (with [Docker Compose](https://docs.docker.com/compose/install/)) and make, jusr run:
If you have [Docker](https://docs.docker.com/engine/installation/) (with [Docker Compose](https://docs.docker.com/compose/install/)) and make, just run:

```console
$ docker-compose up -d
$ docker-compose up -d --build
$ docker-compose run --rm jarbas python manage.py migrate
$ docker-compose run --rm jarbas python manage.py ceapdatasets
```


Expand Down Expand Up @@ -244,4 +246,4 @@ $ python manage.py test

#### Ready!

Run the server with `$ python manage.py runserver` and load [localhost:8000](http://localhost:8000) in your favorite browser.
Run the server with `$ python manage.py runserver` and load [localhost:8000](http://localhost:8000) in your favorite browser.
3 changes: 3 additions & 0 deletions contrib/copyassets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

cp -r /jarbas/frontend/static/* /assets/

0 comments on commit 85164e1

Please sign in to comment.