diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6f66701 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.config +**/.idea +**/.vscode +github.env +Taskfile.yaml + diff --git a/DOCKER-README.md b/DOCKER-README.md new file mode 100644 index 0000000..01f4405 --- /dev/null +++ b/DOCKER-README.md @@ -0,0 +1,50 @@ +# Quilibrium Docker Instructions + +## Build + +Build the docker image: +```shell +docker build -t quilibrium -t quilibrium:1.2.9 . +``` + +Use latest version instead of `1.2.9`. + + +## Run + +Run Quilibrium in a container: +```shell +docker compose up -d +``` + +A `.config/` subfolder will be created under the current folder, this is mapped inside the container. +Make sure you backup `config.ym` and `keys.yml`. + + +## Intereact with a running cotainer + +Drop into a shell inside a running container: +```shell +docker compose exec -it node sh +``` + +Watch the logs: +```shell +docker compose logs +``` + +Get the Peer ID: +```shell +docker compose exec node go run ./... -peer-id +``` + +Get the token ballance: +```shell +docker compose exec node go run ./... -balance +``` + +Run the DB console: +```shell +docker compose exec node go run ./... -db-console +``` + diff --git a/docker-compose.yml b/docker-compose.yml index ad8887e..be21bf6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: node: build: ./ image: quilibrium - restart: always + restart: unless-stopped environment: - DEFAULT_LISTEN_GRPC_MULTIADDR=/ip4/0.0.0.0/tcp/8337 - DEFAULT_LISTEN_REST_MULTIADDR=/ip4/0.0.0.0/tcp/8338