addons-server/docker-compose.yml

107 строки
2.8 KiB
YAML

version: "2.3"
# If you're changing the &env mapping
# please make sure to update tests/ui/docker-compose.selenium.yml
# accordingly.
x-env-mapping: &env
environment:
- CELERY_BROKER_URL=amqp://olympia:olympia@rabbitmq/olympia
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- DATABASES_DEFAULT_URL=mysql://root:@mysqld/olympia
- ELASTICSEARCH_LOCATION=elasticsearch:9200
- MEMCACHE_LOCATION=memcached:11211
- MYSQL_DATABASE=olympia
- MYSQL_ROOT_PASSWORD=docker
- OLYMPIA_SITE_URL=http://olympia.test
- PYTHONDONTWRITEBYTECODE=1
- PYTHONUNBUFFERED=1
- TERM=xterm-256color
- UITEST_FXA_EMAIL
- UITEST_FXA_PASSWORD=uitester
- CIRCLECI=${CIRCLECI}
services:
worker: &worker
<<: *env
image: addons/addons-server:latest
command: supervisord -n -c /code/docker/supervisor-celery.conf
entrypoint: ./scripts/start-docker.sh
volumes:
- .:/code
extra_hosts:
- "olympia.test:127.0.0.1"
web:
<<: *worker
command: supervisord -n -c /code/docker/supervisor.conf
nginx:
image: addons/addons-nginx
volumes:
- ./static:/srv/static
- ./site-static:/srv/site-static
- ./storage/shared_storage/uploads:/srv/user-media
- ./storage/files:/srv/user-media/addons
ports:
- "80:80"
memcached:
image: memcached:1.4
mysqld:
image: mysql:5.7
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=olympia
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.1
environment:
# Disable all xpack related features to avoid unrelated logging
# in docker logs. https://github.com/mozilla/addons-server/issues/8887
# This also avoids us to require authentication for local development
# which simplifies the setup.
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
mem_limit: 2g
redis:
image: redis:2.8
rabbitmq:
image: rabbitmq:3.5
hostname: olympia
expose:
- "5672"
environment:
- RABBITMQ_DEFAULT_USER=olympia
- RABBITMQ_DEFAULT_PASS=olympia
- RABBITMQ_DEFAULT_VHOST=olympia
autograph:
image: mozilla/autograph:3.3.2
command: /go/bin/autograph -c /code/scripts/autograph_travis_test_config.yaml
volumes:
- .:/code
addons-frontend:
<<: *env
environment:
- API_HOST=http://olympia.test
- PROXY_API_HOST=http://olympia.test
- HOSTNAME=uitests
- WEBPACK_SERVER_HOST=olympia.test
- CSP=false
- FXA_CONFIG=default
image: mozilla/addons-frontend:latest
ports:
- "3000:3000"
- "3001:3001"
command: yarn amo
links:
- "nginx:olympia.test"