-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
127 lines (119 loc) · 3.95 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
services:
## Start Common Processes Config
# Note this is not the collector we use in Prod, but works for local testing & github actions
memcached:
image: memcached:latest
ports:
- 11212:11211
- 11211:11211
healthcheck:
# Exiting as healthy for now, memcached does not have a built in way we can healthcheck
test: ['CMD', 'bash', '-c', 'exit 0']
interval: 5s
timeout: 10s
start_period: 10s
retries: 15
redis:
image: redis:7 # we use 7.1 on aws, but redis pulled that tag....
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 10s
start_period: 10s
retries: 15
ports:
- '6379:6379'
mysql:
image: mysql:8.0.36 # use same version as aws aurora
working_dir: /image
volumes:
- ./.docker/mysql-8-resources/schema:/docker-entrypoint-initdb.d:delegated
healthcheck:
# We use a command here because a mysqladmin ping will give a false positive before mysql is accepting connections
# https://chrisguitarguy.com/2023/03/06/waiting-for-mysql-to-be-ready-in-docker-compose/
test: ['CMD', 'mysql', '-u', 'root', '-e', 'USE finished_startup;']
interval: 5s
timeout: 20s
start_period: 60s
retries: 30
command: --default_authentication_plugin=mysql_native_password --sql-mode="NO_ENGINE_SUBSTITUTION" --character-set-server=UTF8MB3 --collation-server=utf8_unicode_ci
ports:
- '3306:3306'
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- TZ=UTC
postgres:
image: postgres:latest
ports:
- '5432:5432'
volumes:
- ./.docker/postgres-resources:/docker-entrypoint-initdb.d:delegated
environment:
POSTGRES_PASSWORD: password
PGUSER: pocket
POSTGRES_USER: pocket
POSTGRES_DB: pocket
healthcheck:
test: ['CMD-SHELL', 'pg_isready', '-d', 'db_prod']
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
localstack:
image: localstack/localstack:4.0.2
ports:
- '4566:4566'
volumes:
- ./.docker/aws-resources:/etc/localstack/init/ready.d
environment:
SERVICES: s3,kinesis,sqs,dynamodb,sts,events,firehose,es
DATA_DIR: /tmp/localstack/data
DOCKER_HOST: unix:///var/run/docker.sock
LOCALSTACK_HOST: localstack
healthcheck:
test:
- CMD
- bash
- -c
# Wait for Localstack to have init'd all of our services: https://docs.localstack.cloud/references/init-hooks/
- curl --silent --fail /dev/null http://localhost:4566/_localstack/init/ready | jq -e '.completed == true' > /dev/null || exit 1
interval: 5s
timeout: 10s
start_period: 10s
retries: 60
snowplow:
image: pocket/snowplow-micro:dev
healthcheck:
test: ['CMD', 'bash', '-c', 'curl -sf localhost:9090/micro/all']
interval: 5s
timeout: 10s
start_period: 10s
retries: 30
ports:
- '9090:9090'
otlpcollector:
image: grafana/otel-lgtm
ports:
# there are lots more ports available, but these are the only one's
# currently being used
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver
- 3000:3000 # Grafana
# # Uncomment this if you want to run the collector locally and send to GCP instead of the one used for local development
# # Make sure to have a service json in GOOGLE_APPLICATION_CREDENTIALS_JSON in the .env file
# otlpcollector:
# build:
# context: ./servers/otel-collector
# dockerfile: Dockerfile
# env_file:
# - .env
# volumes:
# - ./servers/otel-collector/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
# environment:
# - DEPLOYMENT_ENVIRONMENT_NAME=local
# ports:
# # there are lots more ports available, but these are the only one's
# # currently being used
# - 4317:4317 # OTLP gRPC receiver
# - 4318:4318 # OTLP http receiver
# - 3000:3000 # Grafana