Docker Commands - acm-uiuc/groot GitHub Wiki

Commands must be run in the /groot/ folder, on the prod or beta host

ssh [email protected]

Building

sudo docker-compose up -d --build

To only rebuild/redeploy one container:

sudo docker-compose stop <groot-service>
sudo docker-compose build <groot-service>
sudo docker-compose up -d --no-deps <groot-service>

or, alternatively:

sudo docker-compose up -d --no-deps --build <groot-service>
sudo docker-compose -f docker-compose-prod.yml up -d --no-deps --build <groot-service>

In Production

Note that to use the production docker-compose manifest, you need to add -f docker-compose-prod.yml to your commands. (i.e. sudo docker-compose -f docker-compose-prod.yml up -d --no-deps groot-api-gateway)

Viewing Logs

sudo docker-compose logs -f

Alternatively, to view logs for a single service

sudo docker ps
sudo docker logs <groot-service container-id>

Create a new client key

First, stop the docker container holding the api-gateway and open a shell

sudo docker-compose -f docker-compose-prod.yml stop groot-api-gateway
sudo docker-compose -f docker-compose-prod.yml run groot-api-gateway /bin/bash

Then, once you're in the container, register a client

./build/groot-api-gateway -r <client-name>

Finally, start the container again

sudo docker-compose -f docker-compose-prod.yml start groot-api-gateway

Check a client key

First, stop the docker container holding the api-gateway and open a shell

sudo docker-compose -f docker-compose-prod.yml stop groot-api-gateway
sudo docker-compose -f docker-compose-prod.yml run groot-api-gateway /bin/bash

Then, once you're in the container, register a client

./build/groot-api-gateway -c <client-key>

Finally, start the container again

sudo docker-compose -f docker-compose-prod.yml start groot-api-gateway

⚠️ **GitHub.com Fallback** ⚠️