Merge pull request #11 from Flagsmith/improvement/tweak-docker-compose

improvement/tweak-docker-compose
pull/12/head
Ben Rometsch 2 years ago committed by GitHub
commit 29b9bcc3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,68 +1,71 @@
# See https://docs.flagsmith.com/deployment/docker for more information on running Flagsmith in Docker # 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 # 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" version: "3"
volumes: volumes:
pgdata: pgdata:
services: services:
postgres: postgres:
image: postgres:11.12-alpine image: postgres:11.12-alpine
environment: environment:
POSTGRES_PASSWORD: password POSTGRES_PASSWORD: password
POSTGRES_DB: flagsmith POSTGRES_DB: flagsmith
container_name: flagsmith_postgres container_name: flagsmith_postgres
volumes: volumes:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
flagsmith: flagsmith:
image: flagsmith/flagsmith:latest image: flagsmith/flagsmith:latest
environment: environment:
# All environments variables are available here: # All environments variables are available here:
# API: https://docs.flagsmith.com/deployment/locally-api#environment-variables # API: https://docs.flagsmith.com/deployment/locally-api#environment-variables
# UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables # UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables
DJANGO_ALLOWED_HOSTS: "*" # Change this in production ENV: prod # set to "prod" in production.
DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith DJANGO_ALLOWED_HOSTS: "*" # Change this in production
DISABLE_INFLUXDB_FEATURES: "true" # set to 'false' to enable InfluxDB 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. # 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 InfluxDB - https://docs.flagsmith.com/deployment/overview#influxdb # For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables
# INFLUXDB_URL: http://influxdb:8086 #
# INFLUXDB_BUCKET: flagsmith_api # Example SMTP:
# INFLUXDB_ORG: # Add your influx org id here # EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
# INFLUXDB_TOKEN: # Add your influx token here # 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 ports:
# - "8000:8000"
# Example SMTP: depends_on:
# EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend - postgres
# EMAIL_HOST: mail.example.com links:
# SENDER_EMAIL: flagsmith@example.com - postgres
# EMAIL_HOST_USER: flagsmith@example.com
# EMAIL_HOST_PASSWORD: smtp_account_password
# 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 flagsmith_processor:
# ALLOW_REGISTRATION_WITHOUT_INVITE: True image: flagsmith/flagsmith:latest
environment:
ports: DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
- "8000:8000" entrypoint:
depends_on: - "python"
- postgres - "manage.py"
# - influxdb - "runprocessor"
links: - "--sleepintervalms"
- postgres - "500"
# - influxdb:influxdb depends_on:
- flagsmith
# InfluxDB requires additional setup - please see https://docs.flagsmith.com/deployment-overview/#influxdb - postgres
# Note that InfluxDB is optional, but enabling it will provide additional functionality to the Flagsmith platform links:
# influxdb: - postgres
# image: quay.io/influxdb/influxdb:v2.0.3
# container_name: flagsmith_influxdb
# ports:
# - "8086:8086"

Loading…
Cancel
Save