Skip to content

Commit 108df8f

Browse files
feat: add Flagsmith Blueprint (#147)
* feat(blueprints): add Flagsmith blueprint * Update blueprints/flagsmith/docker-compose.yml * Update blueprints/flagsmith/docker-compose.yml * Update blueprints/flagsmith/docker-compose.yml * Update blueprints/flagsmith/docker-compose.yml --------- Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
1 parent f335800 commit 108df8f

File tree

4 files changed

+112
-1
lines changed

4 files changed

+112
-1
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# See https://docs.flagsmith.com/deployment/docker for more information on running Flagsmith in Docker
2+
# This Docker Compose file will run the entire Flagsmith Platform
3+
4+
volumes:
5+
pgdata:
6+
7+
8+
services:
9+
postgres:
10+
image: postgres:15.5-alpine
11+
environment:
12+
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
13+
POSTGRES_DB: flagsmith
14+
volumes:
15+
- pgdata:/var/lib/postgresql/data
16+
healthcheck:
17+
test: ["CMD-SHELL", "pg_isready -d flagsmith -U postgres"]
18+
interval: 2s
19+
timeout: 2s
20+
retries: 20
21+
start_period: 20s
22+
23+
flagsmith:
24+
image: docker.flagsmith.com/flagsmith/flagsmith:2.177.1
25+
environment:
26+
# All environments variables are available here:
27+
# API: https://docs.flagsmith.com/deployment/locally-api#environment-variables
28+
# UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables
29+
30+
DATABASE_URL: postgresql://postgres:${DATABASE_PASSWORD}@postgres:5432/flagsmith
31+
USE_POSTGRES_FOR_ANALYTICS: "true" # Store API and Flag Analytics data in Postgres
32+
33+
ENVIRONMENT: production # set to 'production' in production.
34+
DJANGO_ALLOWED_HOSTS: "*" # Change this in production
35+
FLAGSMITH_DOMAIN: ${FLAGSMITH_DOMAIN:-localhost:8000} # Change this in production
36+
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY} # Change this in production
37+
# PREVENT_SIGNUP: 'true' # Uncomment to prevent additional signups
38+
# ALLOW_REGISTRATION_WITHOUT_INVITE: 'true'
39+
40+
# Enable Task Processor
41+
TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default)
42+
PROMETHEUS_ENABLED: "true"
43+
44+
# Uncomment if you want to enable Google OAuth. Note this does not turn Google OAuth on. You still need to use
45+
# Flagsmith on Flagsmith to enable it - https://docs.flagsmith.com/deployment/#oauth_google
46+
# DJANGO_SECURE_CROSS_ORIGIN_OPENER_POLICY: 'same-origin-allow-popups'
47+
48+
# For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables
49+
# Example SMTP:
50+
# EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
51+
# EMAIL_HOST: mail.example.com
52+
# SENDER_EMAIL: flagsmith@example.com
53+
# EMAIL_HOST_USER: flagsmith@example.com
54+
# EMAIL_HOST_PASSWORD: smtp_account_password
55+
# EMAIL_PORT: 587 # optional
56+
# EMAIL_USE_TLS: 'true' # optional
57+
ports:
58+
- 8000
59+
depends_on:
60+
postgres:
61+
condition: service_healthy
62+
63+
# The flagsmith_processor service is only needed if TASK_RUN_METHOD set to TASK_PROCESSOR
64+
# in the application environment
65+
flagsmith-task-processor:
66+
image: docker.flagsmith.com/flagsmith/flagsmith:2.177.1
67+
environment:
68+
DATABASE_URL: postgresql://postgres:${DATABASE_PASSWORD}@postgres:5432/flagsmith
69+
USE_POSTGRES_FOR_ANALYTICS: "true"
70+
DJANGO_ALLOWED_HOSTS: "*"
71+
PROMETHEUS_ENABLED: "true"
72+
ports:
73+
- 8000
74+
depends_on:
75+
- flagsmith
76+
command: run-task-processor

blueprints/flagsmith/flagsmith.png

16.3 KB
Loading

blueprints/flagsmith/template.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[variables]
2+
main_domain = "${domain}"
3+
django_secret_key = "${password:8}"
4+
database_password = "${password:16}"
5+
6+
[config]
7+
env = [
8+
"DATABASE_PASSWORD=${database_password}",
9+
"DJANGO_SECRET_KEY=${django_secret_key}",
10+
"FLAGSMITH_DOMAIN=${main_domain}",
11+
]
12+
mounts = []
13+
14+
[[config.domains]]
15+
serviceName = "flagsmith"
16+
port = 8_000
17+
host = "${main_domain}"

meta.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,5 +2381,23 @@
23812381
"docs": "https://www.rybbit.io/docs"
23822382
},
23832383
"tags": ["analytics"]
2384-
}
2384+
},
2385+
{
2386+
"id": "flagsmith",
2387+
"name": "Flagsmith",
2388+
"version": "2.177.1",
2389+
"description": "Flagsmith is an open-source feature flagging and remote config service.",
2390+
"logo": "flagsmith.png",
2391+
"links": {
2392+
"github": "https://github.com/Flagsmith/flagsmith",
2393+
"website": "https://www.flagsmith.com/",
2394+
"docs": "https://docs.flagsmith.com/"
2395+
},
2396+
"tags": [
2397+
"feature-flag",
2398+
"feature-management",
2399+
"feature-toggle",
2400+
"remote-configuration"
2401+
]
2402+
}
23852403
]

0 commit comments

Comments
 (0)