Add rough docker section to readme

This commit is contained in:
Zedifus 2021-08-30 04:15:16 +01:00
parent 690669e1da
commit 96595d02e3

View File

@ -15,4 +15,32 @@ Project Homepage - https://craftycontrol.com
Discord Server - https://discord.gg/9VJPhCE Discord Server - https://discord.gg/9VJPhCE
Git Repository - https://gitlab.com/crafty-controller/crafty-web Git Repository - https://gitlab.com/crafty-controller/crafty-web
## Basic Docker Usage
A Docker image pipeline is still to be implimented but for example you can expect the image to be located: `crafty/crafty-commander` and you would change the image in the below docker run to this image.
If you are building from the `docker-compose` you can find it in `./docker/docker-compose.yml` just cd to the docker directory and `docker-compose up -d`
If you'd rather not use `docker-compose` you can use the following `docker run`:
```
$ docker build . -t crafty-commander
# REMEMBER, Build your image!
$ docker run \
--name crafty_commander \
-p 8000:8000 \
-p 8443:8443 \
-p 8123:8123 \
-p 19132:19132/udp \
-p 24000-25600:24000-25600 \
-v "/$(pwd)/docker/backups:/commander/backups" \
-v "/$(pwd)/docker/logs:/commander/logs" \
-v "/$(pwd)/docker/servers:/commander/servers" \
-v "/$(pwd)/docker/config:/commander/app/config" \
crafty-commander
```
A fresh build will take several minutes depending on your system, but will be rapid there after.
If you have a config folder already from previous local installation or docker setup, the image should mount this volume, if none is present then it will populate its own config folder for you.