diff --git a/blueprints/flagsmith/docker-compose.yml b/blueprints/flagsmith/docker-compose.yml new file mode 100644 index 00000000..126051f7 --- /dev/null +++ b/blueprints/flagsmith/docker-compose.yml @@ -0,0 +1,76 @@ +# See https://docs.flagsmith.com/deployment/docker for more information on running Flagsmith in Docker +# This Docker Compose file will run the entire Flagsmith Platform + +volumes: + pgdata: + + +services: + postgres: + image: postgres:15.5-alpine + environment: + POSTGRES_PASSWORD: ${DATABASE_PASSWORD} + POSTGRES_DB: flagsmith + volumes: + - pgdata:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -d flagsmith -U postgres"] + interval: 2s + timeout: 2s + retries: 20 + start_period: 20s + + flagsmith: + image: docker.flagsmith.com/flagsmith/flagsmith:2.177.1 + environment: + # All environments variables are available here: + # API: https://docs.flagsmith.com/deployment/locally-api#environment-variables + # UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables + + DATABASE_URL: postgresql://postgres:${DATABASE_PASSWORD}@postgres:5432/flagsmith + USE_POSTGRES_FOR_ANALYTICS: "true" # Store API and Flag Analytics data in Postgres + + ENVIRONMENT: production # set to 'production' in production. + DJANGO_ALLOWED_HOSTS: "*" # Change this in production + FLAGSMITH_DOMAIN: ${FLAGSMITH_DOMAIN:-localhost:8000} # Change this in production + DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY} # Change this in production + # PREVENT_SIGNUP: 'true' # Uncomment to prevent additional signups + # ALLOW_REGISTRATION_WITHOUT_INVITE: 'true' + + # Enable Task Processor + TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default) + PROMETHEUS_ENABLED: "true" + + # Uncomment if you want to enable Google OAuth. Note this does not turn Google OAuth on. You still need to use + # Flagsmith on Flagsmith to enable it - https://docs.flagsmith.com/deployment/#oauth_google + # DJANGO_SECURE_CROSS_ORIGIN_OPENER_POLICY: 'same-origin-allow-popups' + + # For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables + # Example SMTP: + # EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend + # EMAIL_HOST: mail.example.com + # SENDER_EMAIL: flagsmith@example.com + # EMAIL_HOST_USER: flagsmith@example.com + # EMAIL_HOST_PASSWORD: smtp_account_password + # EMAIL_PORT: 587 # optional + # EMAIL_USE_TLS: 'true' # optional + ports: + - 8000 + depends_on: + postgres: + condition: service_healthy + + # The flagsmith_processor service is only needed if TASK_RUN_METHOD set to TASK_PROCESSOR + # in the application environment + flagsmith-task-processor: + image: docker.flagsmith.com/flagsmith/flagsmith:2.177.1 + environment: + DATABASE_URL: postgresql://postgres:${DATABASE_PASSWORD}@postgres:5432/flagsmith + USE_POSTGRES_FOR_ANALYTICS: "true" + DJANGO_ALLOWED_HOSTS: "*" + PROMETHEUS_ENABLED: "true" + ports: + - 8000 + depends_on: + - flagsmith + command: run-task-processor diff --git a/blueprints/flagsmith/flagsmith.png b/blueprints/flagsmith/flagsmith.png new file mode 100644 index 00000000..26ac1f6d Binary files /dev/null and b/blueprints/flagsmith/flagsmith.png differ diff --git a/blueprints/flagsmith/template.toml b/blueprints/flagsmith/template.toml new file mode 100644 index 00000000..9e0348d2 --- /dev/null +++ b/blueprints/flagsmith/template.toml @@ -0,0 +1,17 @@ +[variables] +main_domain = "${domain}" +django_secret_key = "${password:8}" +database_password = "${password:16}" + +[config] +env = [ + "DATABASE_PASSWORD=${database_password}", + "DJANGO_SECRET_KEY=${django_secret_key}", + "FLAGSMITH_DOMAIN=${main_domain}", +] +mounts = [] + +[[config.domains]] +serviceName = "flagsmith" +port = 8_000 +host = "${main_domain}" diff --git a/meta.json b/meta.json index bb2c6faa..abea1116 100644 --- a/meta.json +++ b/meta.json @@ -2381,5 +2381,23 @@ "docs": "https://www.rybbit.io/docs" }, "tags": ["analytics"] - } + }, + { + "id": "flagsmith", + "name": "Flagsmith", + "version": "2.177.1", + "description": "Flagsmith is an open-source feature flagging and remote config service.", + "logo": "flagsmith.png", + "links": { + "github": "https://github.com/Flagsmith/flagsmith", + "website": "https://www.flagsmith.com/", + "docs": "https://docs.flagsmith.com/" + }, + "tags": [ + "feature-flag", + "feature-management", + "feature-toggle", + "remote-configuration" + ] + } ]