Deployments

This docker-compose.yml file defines a multi-container Docker application with several services that work together to form a complete system. Each service is configured with specific settings to ensure proper operation and integration.

Overview

  • Version: The file uses Docker Compose version 3.7. (Depricated)

  • Networks: A custom network named maiko-local is defined to facilitate communication between the services.

  • Volumes: Several named volumes are defined to persist data across container restarts.

Services

1. maiko-assist

  • Build: The service is built from the current directory using the Dockerfile located in the root.

  • Restart: The container will always restart if it stops.

  • Environment: Environment variables are loaded from the .env.local file.

  • Ports: Port 3000 on the host is mapped to port 3000 on the container.

  • Devices: The device /dev/net/tun is added to the container, allowing it to create TUN/TAP devices.

  • Capabilities: The NET_ADMIN capability is added to the container, allowing it to configure network interfaces.

  • Networks: The service is connected to the maiko-local network.

2. backend

  • Build: The service is built from the backend directory using the Dockerfile.backend file.

  • Restart: The container will always restart if it stops.

  • Environment: Environment variables are loaded from the ./backend/.env file.

  • Ports: Port 3003 on the host is mapped to port 3003 on the container.

  • Networks: The service is connected to the maiko-local network.

  • Memory Limits: The container has a maximum memory limit of 4GB and a soft memory limit of 2GB.

3. mongo

  • Image: The service uses the latest MongoDB image.

  • Restart: The container will always restart if it stops.

  • Environment: The MongoDB root user and password are set using environment variables.

  • Volumes: Data is persisted in the mongo_data volume.

  • Ports: Port 27017 on the host is mapped to port 27017 on the container.

  • Networks: The service is connected to the maiko-local network.

  • Command: The MongoDB server binds to all available network interfaces.

4. chromadb

  • Image: The service uses the latest ChromaDB image.

  • Restart: The container will always restart if it stops.

  • Ports: Port 8000 on the host is mapped to port 8000 on the container.

  • Volumes: Data is persisted in the chromadb volume.

  • Environment: The PERSIST_DIRECTORY and IS_PERSISTENT environment variables are set.

  • Networks: The service is connected to the maiko-local network.

5. main

  • Image: The service uses the microhealthllc/flowfusion:v7 image.

  • Restart: The container will always restart if it stops.

  • Depends On: The service depends on the postgres and redis services.

  • Environment: Environment variables are loaded from the .env.local file.

  • Ports: Port 3002 on the host is mapped to port 3002 on the container.

  • Environment: The PORT environment variable is set to 3002.

  • Networks: The service is connected to the maiko-local network.

6. worker

  • Image: The service uses the microhealthllc/flowfusion:v7 image.

  • Restart: The container will always restart if it stops.

  • Depends On: The service depends on the main service.

  • Environment: Environment variables are loaded from the .env.local file.

  • Environment: The WORKER environment variable is set to true.

  • Networks: The service is connected to the maiko-local network.

7. postgres

  • Image: The service uses the postgres:14.5 image.

  • Restart: The container will always restart if it stops.

  • Environment: The PostgreSQL database name, user, and password are set using environment variables.

  • Volumes: Data is persisted in the postgres_data volume.

  • Networks: The service is connected to the maiko-local network.

  • Healthcheck: A healthcheck is configured to ensure the PostgreSQL server is ready.

8. redis

  • Image: The service uses the latest Redis image.

  • Restart: The container will always restart if it stops.

  • Networks: The service is connected to the maiko-local network.

  • Ports: Port 6379 on the host is mapped to port 6379 on the container.

  • Memory Limits: The container has a maximum memory limit of 6GB and a soft memory limit of 4GB.

Networks

  • maiko-local: A custom network is defined to facilitate communication between the services.

Volumes

  • mongo_data: A named volume for persisting MongoDB data.

  • chromadb: A named volume for persisting ChromaDB data.

  • automatisch_storage: A named volume for additional storage (not used in the current configuration).

  • postgres_data: A named volume for persisting PostgreSQL data.

  • redis_data: A named volume for persisting Redis data.

This configuration ensures that all services are properly set up and can communicate with each other through the maiko-local network, with data persistence provided by the named volumes.

Last updated