Skip to content

Instantly share code, notes, and snippets.

@jwhitlock
Created May 18, 2018 16:52
Show Gist options
  • Select an option

  • Save jwhitlock/a643cf804746be7d23baba5b16d8fa53 to your computer and use it in GitHub Desktop.

Select an option

Save jwhitlock/a643cf804746be7d23baba5b16d8fa53 to your computer and use it in GitHub Desktop.
Kuma docker compose for Django 1.9 development
version: "2.1"
services:
web:
command: ./manage.py runserver_plus 0.0.0.0:8000
stdin_open: true
tty: true
dj19:
image: quay.io/mozmar/kuma_base:django-1.9
# command: pytest kuma/landing kuma/search kuma/health --capture=no
command: pytest kuma --capture=no
# command: ./manage.py check
# command: /usr/bin/make compilejsi18n collectstatic clean
user: ${UID:-33}
volumes:
- ./:/app:z
depends_on:
- memcached
- mysql
- elasticsearch
- redis
- kumascript
environment:
# Django settings overrides:
- ACCOUNT_DEFAULT_HTTP_PROTOCOL=http
- ALLOWED_HOSTS=*
- ATTACHMENT_HOST=${ATTACHMENT_HOST:-localhost:8000}
- BROKER_URL=redis://redis:6379/0
- CELERY_ALWAYS_EAGER=False
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- CSRF_COOKIE_SECURE=False
- DATABASE_URL=mysql://${DATABASE_USER:-root}:${DATABASE_PASSWORD:-kuma}@mysql:3306/developer_mozilla_org
- DEBUG=${DEBUG:-True}
- DOMAIN=localhost
- ENABLE_RESTRICTIONS_BY_HOST=${ENABLE_RESTRICTIONS_BY_HOST:-False}
- ES_URLS=elasticsearch:9200
- INTERACTIVE_EXAMPLES_BASE=${INTERACTIVE_EXAMPLES_BASE:-https://interactive-examples.mdn.mozilla.net}
- KUMASCRIPT_URL_TEMPLATE=http://kumascript:9080/docs/{path}
- MEMCACHE_SERVERS=memcached:11211
- PROTOCOL=http://
- SESSION_COOKIE_SECURE=False
- SITE_URL=http://localhost:8000
- STATIC_URL=${STATIC_URL:-/static/}
# Other environment overrides
- PYTHONDONTWRITEBYTECODE=1
- PYTHONUNBUFFERED=True
- MAINTENANCE_MODE=${MAINTENANCE_MODE:-False}
- REVISION_HASH=${KUMA_REVISION_HASH:-undefined}
# AND
- PYTHONWARNINGS=all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment