-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
161 lines (149 loc) · 3.96 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
---
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
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
volumes:
- .:/app
# Test container
test:
image: local/antenna_deploy_base
env_file:
- docker/config/local_dev.env
- docker/config/test.env
links:
- fakesentry
- gcs-emulator
- localstack
- pubsub
- statsd
volumes:
- .:/app
devcontainer:
build:
dockerfile: .devcontainer/Dockerfile
args:
userid: ${USE_UID:-10001}
groupid: ${USE_GID:-10001}
image: local/antenna-devcontainer
entrypoint: ["sleep", "inf"]
env_file:
- docker/config/local_dev.env
- docker/config/test.env
links:
- fakesentry
- gcs-emulator
- localstack
- pubsub
- statsd
volumes:
- .:/app
# Container that we use in CI--it can't volume mount things
ci:
image: local/antenna_deploy_base
env_file:
- docker/config/local_dev.env
- docker/config/test.env
- my.env
links:
- fakesentry
- gcs-emulator
- localstack
- pubsub
- statsd
# like web but CI can't volume mount things
ci-web:
image: local/antenna_deploy_base
env_file:
# exclude docker/config/test.env because this will be used for systemtest
# which requires store and publish to actually happen
- docker/config/local_dev.env
- my.env
command: web
links:
- fakesentry
- gcs-emulator
- localstack
- pubsub
- statsd
# Web container is a prod-like fully-functioning Antenna container
web:
extends:
service: base
env_file:
- docker/config/local_dev.env
- my.env
ports:
- "${EXPOSE_ANTENNA_PORT:-8000}:8000"
command: web
links:
- fakesentry
- gcs-emulator
- localstack
- pubsub
- statsd
# https://cloud.google.com/sdk/docs/downloads-docker
# official pubsub emulator
pubsub:
# also available as google/cloud-sdk:<version>-emulators
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:463.0.0-emulators
command:
- gcloud
- beta
- emulators
- pubsub
- start
- --host-port=0.0.0.0:${PUBSUB_PORT:-5010}
ports:
- "${EXPOSE_PUBSUB_EMULATOR_PORT:-5010}:5010"
# https://hub.docker.com/r/localstack/localstack/
# localstack running a fake S3 and SQS
localstack:
image: localstack/localstack:3.4.0
environment:
- SERVICES=s3,sqs
- DEFAULT_REGION=us-east-1
- HOSTNAME=localstack
- HOSTNAME_EXTERNAL=localstack
ports:
- "${EXPOSE_LOCALSTACK_PORT:-4566}:4566"
# https://hub.docker.com/r/kamon/grafana_graphite/
# username: admin, password: admin
statsd:
image: kamon/grafana_graphite
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
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