Compare commits

...

2 Commits

Author SHA1 Message Date
76801e9f64 dockerizing 2023-05-02 10:53:48 +02:00
242bfa6a99 dockerizing 2023-05-02 10:49:04 +02:00
29 changed files with 34 additions and 19 deletions

View File

@ -2,9 +2,6 @@ FROM debian:latest
RUN apt-get update && \
apt-get -y install curl && \
curl https://gitea.ds9.dedyn.io/olli/debian.ansible.docker/raw/branch/main/build-debian-env.sh >build-debian-env.sh && \
bash -ex build-debian-env.sh && \
cd / && \
git clone https://gitea.ds9.dedyn.io/olli/dabo.git && \
chmod 555 /dabo/dabo-bot.sh /dabo/analyze.sh
bash -ex build-debian-env.sh
ENV LANG en_US.utf8
ENTRYPOINT ["/dabo/dabo-bot.sh"]

View File

@ -48,6 +48,24 @@ Download:
git clone https://gitea.ds9.dedyn.io/olli/dabo.git
cd dabo
```
Build container:
```
docker -l warn compose --ansi never build --progress=plain --pull --no-cache --force-rm
```
Run:
```
docker-compose down # if on old instance is running
docker-compose up -d
```
Logs:
```
docker-compose logs -f
```
bot.sh is the bot that trades and collects the quotes and analyze.sh is the tool with which you can try out strategies with the historical data.
The configuration files are called bot.conf and analyze.conf. analyze.sh also uses bot.conf but its variables are overwritten by analyze.conf if duplicated.

View File

@ -1,6 +1,6 @@
# The exchange we use for using the correct API
STOCK_EXCHANGE="BINANCE"
# The exchange we use for using the correct API (BINANCE or BITPANDA)
STOCK_EXCHANGE="BITPANDA"
# fee per trade in percentage on exchange (taker and maker added)
FEE="0.4"

View File

@ -7,30 +7,34 @@ services:
dockerfile: Dockerfile
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime
- ./dabo:/dabo:ro
- ./data:/dabo/htdocs:rw
- /etc/localtime:/etc/localtime:ro
networks:
- dabo--network
dabo.dedyn.io:
dabo-web:
image: nginx:latest
restart: unless-stopped
volumes:
- ./htdocs:/usr/share/nginx/html:ro
- ./data:/usr/share/nginx/html:ro
- /etc/localtime:/etc/localtime:ro
networks:
- traefik
labels:
- traefik.enable=true
# HTTPS
- traefik.http.routers.dabo.rule=Host(`dabo.ds9.dedyn.io`)
- traefik.http.routers.dabo.entrypoints=https
- traefik.http.routers.dabo.tls=true
- traefik.http.routers.dabo-web.rule=Host(`dabo.ds9.dedyn.io`)
- traefik.http.routers.dabo-web.entrypoints=https
- traefik.http.routers.dabo-web.tls=true
# Proxy to service-port
- traefik.http.services.dabo.loadbalancer.server.port=80
- traefik.http.routers.dabo.service=dabo-ds9
- traefik.http.services.dabo-web.loadbalancer.server.port=80
- traefik.http.routers.dabo-web.service=dabo-web
# cert via letsencrypt
- traefik.http.routers.dabo.tls.certresolver=letsencrypt
- traefik.http.routers.dabo-web.tls.certresolver=letsencrypt
# activate secHeaders@file
- traefik.http.routers.dabo-web.middlewares=secHeaders@file
# Traefik network
- traefik.docker.network=traefik

View File

@ -1,4 +0,0 @@
#!/bin/bash
sleep 999999999
binance-cli $@