services: gitea: container_name: gitea hostname: gitea.docker.localhost build: context: gitea dockerfile: Dockerfile ports: - "3000:3000" networks: flipt_network: aliases: - gitea.docker.localhost environment: ROOT_URL: http://gitea.docker.localhost:3000/ DOMAIN: gitea.docker.localhost DISABLE_REGISTRATION: "true" REQUIRE_SIGNIN_VIEW: "true" INSTALL_LOCK: "true" DB_TYPE: sqlite3 SSH_DOMAIN: localhost HTTP_PORT: "3000" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000"] interval: 10s timeout: 5s retries: 5 gitea-runner: container_name: gitea_act_runner image: gitea/act_runner:latest-dind-rootless privileged: true restart: always networks: - flipt_network depends_on: gitea: condition: service_healthy restart: true volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - GITEA_INSTANCE_URL=http://gitea:3000 - GITEA_RUNNER_NAME=3ad321497a7e - DOCKER_HOST=unix:///var/run/user/1000/docker.sock - GITEA_RUNNER_REGISTRATION_TOKEN=riyUbrkLdKNKXAw1yjZTpr3JKT35IAzuw8nc0w4C prometheus: container_name: prometheus networks: - flipt_network image: prom/prometheus:latest volumes: - "./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml" - "./prometheus/web-config.yml:/etc/prometheus/web-config.yml" - "./prometheus/rules:/etc/prometheus/rules" - "./prometheus/http.config.yml:/etc/prometheus/http.config.yml" ports: - "9090:9090" command: - --web.enable-otlp-receiver - --config.file=/etc/prometheus/prometheus.yml - --web.config.file=/etc/prometheus/web-config.yml healthcheck: test: [ "CMD", "promtool", "check", "ready", "--http.config.file=/etc/prometheus/http.config.yml", ] interval: 10s timeout: 15s retries: 10 start_period: 10s flipt: image: docker.flipt.io/flipt/flipt:v2-nightly volumes: - "./flipt/config.yml:/etc/flipt/config/default.yml" - "./flipt/policy.rego:/etc/flipt/config/policy.rego" depends_on: prometheus: condition: service_healthy gitea: condition: service_healthy networks: - flipt_network restart: always deploy: replicas: 2 resources: limits: cpus: 0.5 memory: 256M environment: - FLIPT_LOG_LEVEL=warn - FLIPT_ANALYTICS_STORAGE_PROMETHEUS_ENABLED=true - FLIPT_ANALYTICS_STORAGE_PROMETHEUS_URL=http://prometheus:9090 - PROMETHEUS_AUTH_TOKEN=Basic YWRtaW46cGFzc3dvcmQ= - FLIPT_META_TELEMETRY_ENABLED=false - FLIPT_META_CHECK_FOR_UPDATES=false - FLIPT_TRACING_ENABLED=true - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318 - GOMEMLIMIT=200MiB - GOGC=100 command: ["/flipt", "server"] healthcheck: test: ["CMD", "wget", "--spider", "-qO-", "http://localhost:8080/health"] interval: 10s timeout: 15s retries: 10 start_period: 5s haproxy: image: haproxy:3.3-alpine container_name: haproxy ports: - "8080:8080" networks: - flipt_network volumes: - "./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro" depends_on: flipt: condition: service_healthy restart: always jaeger: image: jaegertracing/jaeger:2.17.0 container_name: jaeger deploy: resources: limits: memory: 1200M restart: unless-stopped ports: - "16686:16686" - "4318:4318" networks: - flipt_network webapp: container_name: webapp build: context: webapp dockerfile: Dockerfile ports: - "4000:80" networks: - flipt_network depends_on: hotel-service: condition: service_started flipt: condition: service_healthy hotel-service: container_name: hotel-service build: context: hotel-service dockerfile: Dockerfile ports: - "8000:8000" networks: - flipt_network depends_on: flipt: condition: service_started jaeger: condition: service_started environment: - FLIPT_URL=http://flipt:8080 - FLIPT_NAMESPACE=default - FLIPT_ENVIRONMENT=onoffinc - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318 - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://prometheus:9090/api/v1/otlp - OTEL_EXPORTER_OTLP_METRICS_HEADERS=Authorization=Basic YWRtaW46cGFzc3dvcmQ= - OTEL_SERVICE_NAME=hotel-service admin-service: container_name: admin-service hostname: admin.docker.localhost build: context: admin-service dockerfile: Dockerfile ports: - "8001:8001" networks: - flipt_network depends_on: flipt: condition: service_started jaeger: condition: service_started hotel-service: condition: service_started environment: - FLIPT_URL=http://flipt:8080 - FLIPT_NAMESPACE=admin - FLIPT_ENVIRONMENT=onoffinc - FLIPT_TOKEN=super_token_secret - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318 - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://prometheus:9090/api/v1/otlp/v1/metrics - OTEL_EXPORTER_OTLP_METRICS_HEADERS=Authorization=Basic YWRtaW46cGFzc3dvcmQ= - OTEL_SERVICE_NAME=admin-service - PORT=8001 - HOTEL_SERVICE_URL=http://hotel-service:8000 chaosmonkey: build: context: chaosmonkey dockerfile: Dockerfile networks: - flipt_network depends_on: flipt: condition: service_started environment: - FLIPT_URL=http://flipt:8080 - OFREP_URL=http://flipt:8080 - NUM_SERVER_WORKERS=7 - NUM_CLIENT_WORKERS=3 - FLIPT_NAMESPACE=default - FLIPT_TOKEN=chaosmonkey_secret - FLIPT_ENVIRONMENT=onoffinc restart: unless-stopped deploy: replicas: 2 profiles: [chaos] grafana: image: grafana/grafana container_name: grafana restart: always ports: - "3001:3000" depends_on: prometheus: condition: service_healthy volumes: - ./grafana/dashboards/:/etc/grafana/provisioning/dashboards/ - ./grafana/datasources/:/etc/grafana/provisioning/datasources/ networks: - flipt_network environment: - GF_SECURITY_ADMIN_PASSWORD=password profiles: [chaos] networks: flipt_network: