Docker

Infleare Docker Deployment Documentation

Running Infleare with docker run

You can start the Infleare service using the docker run command while passing a YAML configuration as an environment variable.

Command:

docker run -p 4775:4775 --name infleare_service --restart unless-stopped extendsware/infleare:latest

Command with config:

docker run -e "config=$(cat config.yaml)" -p 4775:4775 --name infleare_service --restart unless-stopped extendsware/infleare:latest

Explanation:

  • -e "config=$(cat config.yaml)": Reads the contents of config.yaml and passes it as an environment variable.

  • -p 4775:4775: Maps port 4775 from the container to the host.

  • --name infleare_service: Assigns a name to the running container.

  • --restart unless-stopped: Ensures the container restarts unless manually stopped.

  • extendsware/infleare:latest: Uses the latest version of the Infleare image.

Running Infleare with Docker Compose

You can use docker-compose to define and manage the Infleare service.

docker-compose.yml Example:

version: '3.8'

services:
  infleare:
    image: extendsware/infleare:latest
    container_name: infleare_service
    ports:
      - "4775:4775"  # Adjust as needed
    restart: unless-stopped
    environment:
      config: |
        security:
          enable_auth: true
          auth_method: "basic"
          users:
            - username: "admin"
              password: "admin123"        

Output

docker run output

Explanation:

  • version: '3.8': Specifies the Docker Compose file format version.

  • services: Defines containerized services.

  • infleare: Name of the service.

  • image: extendsware/infleare:latest: Uses the latest Infleare image.

  • container_name: infleare_service: Assigns a fixed name to the container.

  • ports: Maps container ports to host ports.

  • restart: unless-stopped: Ensures the container restarts unless manually stopped.

  • environment: Defines environment variables for the container. - The config variable contains YAML-style authentication settings: - Enables authentication. - Uses basic authentication. - Defines users with usernames and passwords.

Deploying with Docker Compose

To deploy using Docker Compose, run:

docker-compose up -d

Stopping the Service

docker-compose down

Verifying the Deployment

After deployment, verify the service is running with:

docker ps

Check logs:

docker logs infleare_service

This setup ensures a secure and manageable Infleare deployment using Docker.

I have read this