improvement/tweak docker compose

pull/11/head
Ben Rometsch 2 years ago
parent b090682177
commit b333a6bb7e

@ -4,68 +4,68 @@
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
ENV: prod # set to "prod" in production. ENV: prod # set to "prod" in production.
DJANGO_ALLOWED_HOSTS: '*' # Change this in production DJANGO_ALLOWED_HOSTS: "*" # Change this in production
DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
USE_POSTGRES_FOR_ANALYTICS: 'True' # Store API and Flag Analytics data in Postgres USE_POSTGRES_FOR_ANALYTICS: "True" # Store API and Flag Analytics data in Postgres
# PREVENT_SIGNUP: 'True' # Uncomment to prevent additional signups # 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 # 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 # ALLOW_REGISTRATION_WITHOUT_INVITE: True
# Enable Task Processor # Enable Task Processor
# To use task processor service, uncomment line below and additional 'flagsmith_processor' # To use task processor service, uncomment line below and additional 'flagsmith_processor'
# container below # container below
TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default) 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 # For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables
# #
# Example SMTP: # Example SMTP:
# EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend # EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
# EMAIL_HOST: mail.example.com # EMAIL_HOST: mail.example.com
# SENDER_EMAIL: flagsmith@example.com # SENDER_EMAIL: flagsmith@example.com
# EMAIL_HOST_USER: flagsmith@example.com # EMAIL_HOST_USER: flagsmith@example.com
# EMAIL_HOST_PASSWORD: smtp_account_password # EMAIL_HOST_PASSWORD: smtp_account_password
# EMAIL_PORT: 587 # optional # EMAIL_PORT: 587 # optional
# EMAIL_USE_TLS: True # optional # EMAIL_USE_TLS: True # optional
ports: ports:
- "8000:8000" - "8000:8000"
depends_on: depends_on:
- postgres - postgres
links: links:
- postgres - postgres
flagsmith_processor: flagsmith_processor:
image: flagsmith/flagsmith:latest image: flagsmith/flagsmith:latest
environment: environment:
DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
entrypoint: entrypoint:
- "python" - "python"
- "manage.py" - "manage.py"
- "runprocessor" - "runprocessor"
- "--sleepintervalms" - "--sleepintervalms"
- "500" - "500"
depends_on: depends_on:
- flagsmith - flagsmith
- postgres - postgres
links: links:
- postgres - postgres

Loading…
Cancel
Save