Skip to main content
Version: v2.0.7

Development

Easily set up a local development environment.

Step 1: Install docker and docker compose

See documentation on docs.docker.com

Step 2: Start dragonfly

Enter dragonfly project and start docker-compose, refer to deploy with docker compose.

$ cd deploy/docker-compose
$ export IP=127.0.0.1
$ ./run.sh
Creating mysql ... done
Creating redis ... done
Creating manager ... done
Creating scheduler ... done
Creating seed-peer ... done
Creating dfdaemon ... done
wait for all service ready: 1/ 6,0 times check
wait for all service ready: 3/ 6,1 times check
wait for all service ready: 3/ 6,2 times check
wait for all service ready: 5/ 6,3 times check
wait for all service ready: 5/ 6,4 times check
Name Command State Ports
-----------------------------------------------------------------
dfdaemon /opt/dragonfly/bin/dfget d ... Up (healthy)
manager /opt/dragonfly/bin/server Up (healthy)
mysql docker-entrypoint.sh mariadbd Up (healthy)
redis docker-entrypoint.sh --req ... Up (healthy)
scheduler /opt/dragonfly/bin/scheduler Up (healthy)
seed-peer /opt/dragonfly/bin/dfget d ... Up (healthy)

Step 3: Log analysis

Show dragonfly manager logs.

$ docker exec -it manager /bin/sh
$ tail -f /var/log/dragonfly/manager/*log

Show dragonfly scheduler logs.

$ docker exec -it scheduler /bin/sh
$ tail -f /var/log/dragonfly/scheduler/*log

Show dragonfly peer logs.

$ docker exec -it dfdaemon /bin/sh
$ tail -f /var/log/dragonfly/dfdaemon/*log

Show dragonfly seed peer logs.

$ docker exec -it seed-peer /bin/sh
$ tail -f /var/log/dragonfly/dfdaemon/*log

Step 4: Stop dragonfly

$ docker-compose down
[+] Running 6/6
⠿ Container dfdaemon Removed
⠿ Container seed-peer Removed
⠿ Container scheduler Removed
⠿ Container manager Removed
⠿ Container mysql Removed
⠿ Container redis Removed