Docker

How to easily install FlagFlow in a Docker environment

Prerequisites

Before installing FlagFlow with Docker, ensure you have the following installed on your system:

  • Docker Engine (version 20.0 or higher)
  • Docker Compose (if using the compose setup)

Docker standalone

You can install the FlagFlow system standalone in a Docker environment. Simply run the following command:

Run FlagFlow standalone container
docker run -d \
  --name flagflow \
  -p 3000:3000 \
  -e ETCD_SERVER=etcd:2379 \
  -e ETCD_USERNAME=root \
  -e ETCD_PASSWORD=pw_flagflow \
  ghcr.io/flagflow/flagflow:1.7.0

This example connects to an etcd server at etcd:2379. If you don't have an etcd server running, consider using the Docker Compose setup below which includes etcd.

Docker Compose

With Docker Compose, you can install the FlagFlow system together with etcd. Create the following file named docker-compose.yml:

docker-compose.yml
version: '3.8'

services:
  etcd:
    image: bitnami/etcd:3.6.4-debian-12-r2
    container_name: flagflow-etcd
    environment:
      - ETCD_ROOT_PASSWORD=pw_flagflow
    volumes:
      - etcd-data:/bitnami/etcd
    # Not needed, because network allows communication between containers
    ports:
      - "2379:2379"
    networks:
      - flagflow-network
    # Health check is not mandatory, but recommended in production
    healthcheck:
      test: ["CMD", "etcdctl", "--user=root:pw_flagflow", "endpoint", "health"]
      interval: 15s
      timeout: 10s
      retries: 2
    restart: on-failure

  flagflow:
    image: ghcr.io/flagflow/flagflow:1.7.0
    container_name: flagflow-app
    depends_on:
      - etcd
    environment:
      - ETCD_SERVER=etcd:2379
      - ETCD_USERNAME=root
      - ETCD_PASSWORD=pw_flagflow
    ports:
      - "3000:3000"
    networks:
      - flagflow-network
    # Health check is not mandatory, but recommended in production
    healthcheck:
      test: 'curl -s -I http://localhost:3000/health | head -n 1 | grep 200'
      interval: 15s
      timeout: 10s
      retries: 2
    restart: on-failure

# You can use nginx as a reverse proxy in front of FlagFlow
# ...

volumes:
  etcd-data:

networks:
  flagflow-network:
    driver: bridge

Then start the services with:

Start Docker Compose services
docker-compose up -d

Environment Variables

FlagFlow supports the following environment variables for configuration:

  • ETCD_ENDPOINTS - Comma-separated list of etcd endpoints (default: http://localhost:2379)
  • PORT - Port to run the FlagFlow server on (default: 3000)
  • LOG_LEVEL - Log level (debug, info, warn, error) (default: info)

Verification

After starting FlagFlow, you can verify that it's running correctly by:

  1. Opening your browser and navigating to http://localhost:3000
  2. Checking the container logs:
Check FlagFlow logs
# For standalone container
docker logs flagflow

# For Docker Compose
docker-compose logs flagflow
© 2025 FlagFlow All Rights Reserved. llms.txt