Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated docker documentation #54

Merged
merged 1 commit into from
Apr 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker/env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ POSTGRES_DB=trader

POLONIEX_API_KEY=
POLONIEX_API_SECRET=

PYTRADER_USER=trader
PYTRADER_PASSWORD=trader
22 changes: 19 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,12 @@ cp pypolo/local_settings.py.example pypolo/local_settings.py
```

1. Add your POLONIEX_API_KEY and POLONIEX_API_SECRET to docker/env (its gitignored, dont worry)
2. Build Docker image (compiling stuff for scipy and numpy takes time): `docker-compose build` or pull the images from Docker Hub: `docker-compose pull`
2. Set your PYTRADER_LOGIN and PYTRADER_PASSWORD to docker/env. This will set the login you use to access the site.
3. Build Docker image (compiling stuff for scipy and numpy takes time): `docker-compose build` or pull the images from Docker Hub: `docker-compose pull`
4. Run the containers: `docker-compose up`
5. Get shell: `docker exec -it pytrader_web_1 /bin/bash`
6. Place sql seed in this repo dir as `prices.psql`
7. in Django container
6. Place sql seed in this repo dir as `prices.psql`, or see PSQL_NOTES below
7. in Django container

```
cd /root/pytrader
Expand All @@ -254,6 +255,21 @@ wait for the psql load to end
9. Visit http://localhost:8000/admin and log in as `trader:trader`


PSQL_NOTES
PSQL seed is available from: http://dumps.snipanet.com/
Newest seed is available at http://dumps.snipanet.com/history_price-latest.psql.gz

Script that can be run to update the first time:
```
cd /root/pytrader
wget http://dumps.snipanet.com/history_price-latest.psql.gz
gunzip history_price-latest.psql.gz
export PGPASSWORD=$POSTGRES_PASSWORD
psql -h db -U trader trader < history_price-latest.psql
rm -f history_price-latest.psql
```


<!-- Google Analytics -->
<img src='https://ga-beacon.appspot.com/UA-1014419-15/owocki/pytrader' style='width:1px; height:1px;' >

Expand Down