Note: This documentation is mainly to get a development environment up and running. If you want to run Onify on Docker in prod, you need to setup nginx etc.
You need to have Docker installed, see https://docs.docker.com/engine/install/.
You need access to the Onify Hub container images located at Google Container Registry (eu.gcr.io
). For this you need a keyfile.json
. Please contact support@onify.co
for more info.
Login to Docker with:
For OSX or Linux
cat keyfile.json | docker login -u _json_key --password-stdin https://eu.gcr.io/onify-images
or Windows (cmd)
docker login -u _json_key --password-stdin https://eu.gcr.io/onify-images < keyfile.json
Note: You might also need access to GitHub Container Registry (
ghcr.io
) for Onify Helix. You need a username and a personal access token (PAT) for this. Please contactsupport@onify.co
for more info.
- Create a
.env
file (see.env.example
) containing all environment variables - Check that you have the environments in place by calling
docker-compose config
(optional) - Start Onify Hub by calling
docker-compose up
Token used to authenticate app backend with api. Generated api token from API_APP_SECRET
:
For OSX or Linux
source .env
echo -n "app:$API_APP_SECRET" | base64
or Windows (Powershell):
$API_APP_SECRET="<Onify hub app secret>"
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("app:" + $API_APP_SECRET))
Add the result as APP_API_TOKEN
value in .env
file where the value is surrounded by quotes.
Hub is exposed as:
app
: http://localhost:3000- try to login with admin and your
ADMIN_PASSWORD
set in.env
file
- try to login with admin and your
api
: http://localhost:8181/documentation
or start things with names using -d
to detach the container from the console.
docker-compose up -d elasticsearch agent-server
docker-compose up api worker app
To reset the entire Hub you can delete the Elasticsearch indices.
curl -XDELETE http://localhost:9200/*
The api will crash and restart and you are back to square 1.