-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
87 lines (81 loc) · 2.19 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
version: "3"
services:
db:
image: postgres:9.6@sha256:78890d2b9c6a8eb312b1c4f4ee460da1d1d16d27f94312b910fbf43a30230ba4
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=buildhub2
- POSTGRES_PASSWORD=buildhub2
- POSTGRES_DB=buildhub2
healthcheck:
test: ["CMD", "pg_isready", "-U", "buildhub2", "-d", "buildhub2"]
interval: 1s
timeout: 3s
retries: 30
elasticsearch:
# Intent to always match
# https://github.com/mozilla-services/cloudops-infra/blob/buildhub2/projects/buildhub2/k8s/charts/elasticsearch/values.yaml
image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
# I don't think this healthcheck is ever used
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
# Web container is a prod-like fully-functioning container.
web:
build:
context: .
dockerfile: Dockerfile
args:
- FRONTEND_SENTRY_PUBLIC_DSN
- CI
image: buildhub:build
env_file:
- .env
depends_on:
- db
- elasticsearch
ports:
- "8000:8000"
environment:
- DJANGO_CONFIGURATION
- DJANGO_ES_URLS=http://elasticsearch:9200
- DATABASE_URL=postgres://buildhub2:buildhub2@db/buildhub2
- DEVELOPMENT=1
- GOOGLE_APPLICATION_CREDENTIALS=/tmp/credentials
volumes:
- $PWD:/app
# uncomment after setting appropriate .env variables to enable BigQuery testing
# - ${GOOGLE_APPLICATION_CREDENTIALS}:/tmp/credentials
command: web-dev
ui:
build:
context: .
dockerfile: ui/Dockerfile
environment:
- HOST=0.0.0.0
- PORT=3000
- NODE_ENV=development
- REACT_APP_COLLECTION_URL=http://localhost:8000/api/
ports:
- "3000:3000"
- "35729:35729"
volumes:
- $PWD/ui:/app
command: start
volumes:
esdata:
driver: local
pgdata: