Deploying in a production environment (docker compose)
The docker-compose.yml file facilitates debugging and experimenting with the Milestone AI Bridge, because all the services are exposed on the host running docker compose directly. In a production environment, you would not want to expose all these services and you can use the docker-compose-production.yml file instead.
To run Milestone AI Bridge in production mode, when deploying Milestone AI Bridge replace this command in the terminal on the host running docker compose:
docker compose --parallel 1 up -d
with this one:
docker compose -f docker-compose-production.yml --parallel 1 up -d
The docker-compose-production.yml file is a modified compose file that only exposes services that are absolutely required by creating an 'internal network'. In the 'internal network', containers can connect to containers by using their own container name.
To access the internal network services from your application, you can:
-
Extend the compose file to also deploy your own containers
-
Connect to the network defined by the Milestone AI Bridge deployment in your own docker compose file
The default name of the internal network is aws_default and can be accessed from another compose deployment by adding the following section to your own docker compose file.
networks:
default:
enable:ipv6: ${ENABLE_IPV6}
name: ${AIBRIDGE_NETWORK}
where the default values of the variables are :
-
${ENABLE_IPV6} false
-
${AIBRIDGE_NETWORK} "aibridge_default"
For more information, see the Docker Compose documentation https://docs.docker.com/compose/ (external link)