This repository has been archived by the owner on May 19, 2023. It is now read-only.
forked from atkinson/wagmi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To allow django to start (useful when running in docker) Also import transitive dependency for ftx see quan-digital/ftx#3
- Loading branch information
Showing
5 changed files
with
56 additions
and
3 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
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,24 @@ | ||
AJ Server didn't start (on 8080), so I had to run this from within the django container (ssh) | ||
|
||
pip3 install -r requirements.txt | ||
pip3 install ciso8601 from within the container (now added to requirements.txt) | ||
|
||
|
||
start: root@6fe72ffa1ef3:/app# /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf | ||
|
||
TODO Solve: | ||
TODO Read use compose in production: https://docs.docker.com/compose/production/ | ||
|
||
Docker compose should add exchanges | ||
7. load the exchanges: ./manage.py loaddata exchanges.yaml | ||
8. load the strategies: ./manage.py loaddata strategies.yaml | ||
|
||
Why does trading-server.yml has "command: ./wagmi/start.sh"? | ||
This file runs makemigration+migrate+runserver | ||
TODO CHeck: Seems this will override the DockerFile's CMD? | ||
ie it skips : CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] | ||
ref: https://github.com/compose-spec/compose-spec/blob/master/spec.md#command | ||
|
||
Notes: | ||
rebuild image: docker-compose -f trading-server.yml build --no-cache | ||
run container: docker-compose -f trading-server.yml up -d |
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 |
---|---|---|
|
@@ -8,3 +8,7 @@ pandas_market_calendars | |
pyEX | ||
|
||
psycopg2-binary | ||
|
||
# Exchanges: | ||
ciso8601 | ||
ftx |
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,23 @@ | ||
#import pandas_market_calendars as mcal | ||
# Create a calendar | ||
#nyse = mcal.get_calendar('NYSE') | ||
# Show available calendars | ||
# print(mcal.get_calendar_names()) | ||
|
||
def test_vargs(arg1, *args): | ||
print(f"arg1: {arg1}") | ||
for a in args: | ||
print(f"*arg: {arg1}") | ||
|
||
|
||
test_vargs("a", "b", 2) | ||
|
||
|
||
def test_kargs(arg1, **kwargs): # keyworded args | ||
for k, v in kwargs.items(): | ||
print(f"{k}={v}")’ | ||
|
||
|
||
dict1 = {"k1": "v1", "k2": "v2"} | ||
test_kargs("a", k1="v1", k2="v2") | ||
test_kargs("a", **dict1) # unpack operator |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "start.sh go" | ||
python manage.py makemigrations | ||
python manage.py migrate | ||
python manage.py runserver 0.0.0.0:8080 | ||
python manage.py runserver 0.0.0.0:8080 | ||
echo "start.sh bye" |