adding a new docker - VisionSystemsInc/voxel_globe GitHub Wiki
Every service and debugging feature in VoxelGlobe lives inside a docker. All the dockerfiles and added files exist in the ./docker
directory
There are two types of services, single node services and multiple node services. Most of the services now are single node services, meaning only one instance of the service runs. Celery is the exception, where you can have one or more nodes running. Every Docker container running can be using the same image with different environment variables or command line arguments, or use different images (with a default image used when the image does not exist).
Everything is tied together by environment variables. First environment variables for a service to vip.bsh
. Create and add a new section like #### NGINX Server ####
. All environment variables must start with VIP_
. (See here for creating non VIP
environment variables). All environment variables should start with VIP_${service name}_
. This creates an easy way to capture all the VIP
settings if ever needed.
Under the Docker settings
section, be sure to add a VIP_DOCKER_{service name}_IMAGE_NAME
and VIP_DOCKER_{service name}_CONTAINER_NAME
entry for the new service
Settings dealing with the dockertization of the service should go under the Docker Settings
in an equivalent subsection like # nginx
. This includes settings like the port number used inside the container, paths used inside the container, etc... Most of these should probably have a _DOCK
suffix.
In the just
script add
- If this new service is part of the default behavior of VoxelGlobe, the Docker image should always be pushed and pulled from DockerHub. If this is the case, add it to the DOCKERHUB_IMAGE_NAMES array
- If this new service is part of the default behavior of VoxelGlobe, then it should auto start with
./just start
, etc... To do this, add it to theSERVICE_NAMES
array. You can conditionally add it likenotebook
is. - Add a
build_{service name}
section to caseify. Be sure to always build dependent images, if you need them. - Add a
start_{service_name}
section to caseify, to specify all the extra arguments to start the container. You should always used the--name
option using theVIP_DOCKER_{service name}_CONTAINER_NAME
variable, andVIP_DOCKER_{service name}_IMAGE_NAME
for the docker image name. - The rest of the sections are optional,
stop_{service name}
,wait_{service name}
,restart_{service name}
,quick-restart_{service name}
,force-stop_{service name}
,kill_{service name}
,clean_{service name}
,enter_{service name}
etc... Use this to define custom actions for the service or else the default action will be executed.