-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
134 lines (124 loc) · 3.26 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
version: "2"
services:
# This builds an image of the deploy base. Then we extend that with
# dev-related things to do our dev-y stuff.
deploy-base:
build:
context: .
dockerfile: docker/Dockerfile
args:
userid: ${USE_UID:-10001}
groupid: ${USE_GID:-10001}
image: local/antenna_deploy_base
# ------------------------------------------------------------------
# After this point is dev-related services.
# ------------------------------------------------------------------
# Base container is used for development tasks like tests, linting, and
# building docs.
base:
image: local/antenna_deploy_base
# Test container
test:
image: local/antenna_deploy_base
env_file:
- docker/config/local_dev.env
- docker/config/test.env
links:
- fakesentry
- gcs-emulator
- pubsub
- statsd
devcontainer:
build:
dockerfile: .devcontainer/Dockerfile
args:
userid: ${USE_UID:-10001}
groupid: ${USE_GID:-10001}
image: local/antenna-devcontainer
entrypoint: ["sleep", "inf"]
stop_signal: SIGKILL # Doesn't seem to respond to anything else
env_file:
- docker/config/local_dev.env
- docker/config/test.env
links:
- fakesentry
- gcs-emulator
- pubsub
- statsd
volumes:
- .:/app
# Web container is a prod-like fully-functioning Antenna container
web:
extends:
service: base
env_file:
- docker/config/local_dev.env
- .env
command: web
links:
- fakesentry
- gcs-emulator
- pubsub
- statsd
# https://cloud.google.com/sdk/docs/downloads-docker
# official pubsub emulator
pubsub:
build:
context: docker/images/pubsub-emulator
image: local/antenna-pubsub-emulator
command:
- gcloud
- beta
- emulators
- pubsub
- start
- --host-port=0.0.0.0:${PUBSUB_PORT:-5010}
stop_signal: SIGINT
ports:
- "${EXPOSE_PUBSUB_EMULATOR_PORT:-5010}:5010"
# https://hub.docker.com/r/kamon/grafana_graphite/
# username: admin, password: admin
statsd:
build:
context: docker/images/grafana
image: local/antenna-grafana
ports:
- "${EXPOSE_GRAFANA_PORT:-9000}:3000"
# https://github.com/willkg/kent
fakesentry:
build:
context: docker/images/fakesentry
image: local/antenna_fakesentry
ports:
- "${EXPOSE_SENTRY_PORT:-8090}:8090"
command: run --host 0.0.0.0 --port 8090
# https://github.com/fsouza/fake-gcs-server
# Fake GCP GCS server for local development and testing
gcs-emulator:
build:
context: docker/images/gcs-emulator
image: local/antenna_gcs_emulator
command: >-
-port 8001
-scheme http
-external-url http://gcs-emulator:8001
-public-host gcs-emulator:8001
ports:
- "${EXPOSE_GCS_EMULATOR_PORT:-8001}:8001"
healthcheck:
test: ["CMD", "curl", "-f", "--insecure", "http://localhost:8001/storage/v1/b"]
interval: 1s
timeout: 3s
retries: 5
nginx:
build:
context: docker/images/nginx
image: local/antenna_nginx
environment:
- UPSTREAM=web:8000
- CLIENT_BODY_TIMEOUT=2s
ports:
- "${EXPOSE_ANTENNA_PORT:-8000}:8080"
links:
- web