forked from mozilla/addons-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
106 lines (94 loc) · 2.59 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: "2.3"
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
- RECURSION_LIMIT=10000
- TERM=xterm-256color
services:
worker: &worker
<<: *env
image: addons/addons-server
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
- ./user-media/:/srv/user-media
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:2.3.0
selenium-firefox:
<<: *env
image: b4handjr/selenium-firefox
volumes:
- .:/code
expose:
- "4444"
ports:
- "5900"
shm_size: 2g
links:
- "addons-frontend:olympia-frontend.test"
- "nginx:olympia.test"
addons-frontend:
<<: *env
environment:
- HOSTNAME=uitests
- WEBPACK_SERVER_HOST=olympia-frontend.test
- FXA_CONFIG=default
image: addons/addons-frontend
ports:
- "3000:3000"
- "3001:3001"
command: yarn amo:ui-tests
links:
- "nginx:olympia.test"