From b090682177f1aab54a8b2d1f4fa48ba9fe831b35 Mon Sep 17 00:00:00 2001 From: Ben Rometsch Date: Wed, 22 Mar 2023 14:27:08 +0000 Subject: [PATCH 1/2] improvement/tweak docker compose --- docker-compose.yml | 47 ++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5e362bd..4ce663f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,5 @@ # See https://docs.flagsmith.com/deployment/docker for more information on running Flagsmith in Docker # This will docker-compose file will run the entire Flagsmith Platform in Docker -# Uncomment and configure InfluxDB lines below (not necessary but adds some functionality that requires InfluxDB) version: "3" @@ -24,17 +23,18 @@ services: # API: https://docs.flagsmith.com/deployment/locally-api#environment-variables # UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables - DJANGO_ALLOWED_HOSTS: "*" # Change this in production - DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith - DISABLE_INFLUXDB_FEATURES: "true" # set to 'false' to enable InfluxDB - ENV: prod # set to "prod" in production. + DJANGO_ALLOWED_HOSTS: '*' # Change this in production + DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith + USE_POSTGRES_FOR_ANALYTICS: 'True' # Store API and Flag Analytics data in Postgres + # PREVENT_SIGNUP: 'True' # Uncomment to prevent additional signups + # ENABLE_ADMIN_ACCESS_USER_PASS: True # set to True to enable access to the /admin/ Django backend via your username and password + # ALLOW_REGISTRATION_WITHOUT_INVITE: True - # For more info on configuring InfluxDB - https://docs.flagsmith.com/deployment/overview#influxdb - # INFLUXDB_URL: http://influxdb:8086 - # INFLUXDB_BUCKET: flagsmith_api - # INFLUXDB_ORG: # Add your influx org id here - # INFLUXDB_TOKEN: # Add your influx token here + # Enable Task Processor + # To use task processor service, uncomment line below and additional 'flagsmith_processor' + # container below + TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default) # For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables # @@ -47,22 +47,25 @@ services: # EMAIL_PORT: 587 # optional # EMAIL_USE_TLS: True # optional - # ENABLE_ADMIN_ACCESS_USER_PASS: True # set to True to enable access to the /admin/ Django backend via your username and password - # ALLOW_REGISTRATION_WITHOUT_INVITE: True - ports: - "8000:8000" depends_on: - postgres - # - influxdb links: - postgres - # - influxdb:influxdb - # InfluxDB requires additional setup - please see https://docs.flagsmith.com/deployment-overview/#influxdb - # Note that InfluxDB is optional, but enabling it will provide additional functionality to the Flagsmith platform - # influxdb: - # image: quay.io/influxdb/influxdb:v2.0.3 - # container_name: flagsmith_influxdb - # ports: - # - "8086:8086" + flagsmith_processor: + image: flagsmith/flagsmith:latest + environment: + DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith + entrypoint: + - "python" + - "manage.py" + - "runprocessor" + - "--sleepintervalms" + - "500" + depends_on: + - flagsmith + - postgres + links: + - postgres From b333a6bb7e2018bd0495ff9a1351d2e54317ed4b Mon Sep 17 00:00:00 2001 From: Ben Rometsch Date: Wed, 22 Mar 2023 14:33:16 +0000 Subject: [PATCH 2/2] improvement/tweak docker compose --- docker-compose.yml | 114 ++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4ce663f..651c61d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,68 +4,68 @@ version: "3" volumes: - pgdata: + pgdata: services: - postgres: - image: postgres:11.12-alpine - environment: - POSTGRES_PASSWORD: password - POSTGRES_DB: flagsmith - container_name: flagsmith_postgres - volumes: - - pgdata:/var/lib/postgresql/data + postgres: + image: postgres:11.12-alpine + environment: + POSTGRES_PASSWORD: password + POSTGRES_DB: flagsmith + container_name: flagsmith_postgres + volumes: + - pgdata:/var/lib/postgresql/data - flagsmith: - image: flagsmith/flagsmith:latest - 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 + flagsmith: + image: flagsmith/flagsmith:latest + 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 - ENV: prod # set to "prod" in production. - DJANGO_ALLOWED_HOSTS: '*' # Change this in production - DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith - USE_POSTGRES_FOR_ANALYTICS: 'True' # Store API and Flag Analytics data in Postgres - # PREVENT_SIGNUP: 'True' # Uncomment to prevent additional signups - # ENABLE_ADMIN_ACCESS_USER_PASS: True # set to True to enable access to the /admin/ Django backend via your username and password - # ALLOW_REGISTRATION_WITHOUT_INVITE: True + ENV: prod # set to "prod" in production. + DJANGO_ALLOWED_HOSTS: "*" # Change this in production + DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith + USE_POSTGRES_FOR_ANALYTICS: "True" # Store API and Flag Analytics data in Postgres + # PREVENT_SIGNUP: 'True' # Uncomment to prevent additional signups + # ENABLE_ADMIN_ACCESS_USER_PASS: True # set to True to enable access to the /admin/ Django backend via your username and password + # ALLOW_REGISTRATION_WITHOUT_INVITE: True - # Enable Task Processor - # To use task processor service, uncomment line below and additional 'flagsmith_processor' - # container below - TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default) + # Enable Task Processor + # To use task processor service, uncomment line below and additional 'flagsmith_processor' + # container below + TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default) - # 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 + # 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:8000" - depends_on: - - postgres - links: - - postgres + ports: + - "8000:8000" + depends_on: + - postgres + links: + - postgres - flagsmith_processor: - image: flagsmith/flagsmith:latest - environment: - DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith - entrypoint: - - "python" - - "manage.py" - - "runprocessor" - - "--sleepintervalms" - - "500" - depends_on: - - flagsmith - - postgres - links: - - postgres + flagsmith_processor: + image: flagsmith/flagsmith:latest + environment: + DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith + entrypoint: + - "python" + - "manage.py" + - "runprocessor" + - "--sleepintervalms" + - "500" + depends_on: + - flagsmith + - postgres + links: + - postgres