-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
61 lines (59 loc) · 1.57 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
---
# Some of this info was necessary for this to work:
# https://discuss.elastic.co/t/logstash-s3-output-plugin-with-aws-emulation-with-localstack/255822
services:
localstack:
container_name: "localstack"
image: localstack/localstack
healthcheck:
test:
- CMD
- bash
- -c
- awslocal s3 ls
interval: 5s
timeout: 10s
start_period: 10s
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
logstash:
depends_on:
localstack:
condition: service_healthy
healthcheck:
test: "${DOCKER_HEALTHCHECK_TEST:-/usr/bin/curl --fail http://logstash:logstash@localhost:8080 || exit 1}"
interval: 10s
timeout: 3s
start_period: 5s
retries: 20
build:
dockerfile: $PWD/Dockerfile
context: logstash
environment:
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_REGION: us-east-1
AWS_BUCKET: logstash-bucket
AWS_ENDPOINT: http://localstack:4566
DRAIN_USER: logstash
DRAIN_PASSWORD: logstash
PORT: 8080
ports:
- 8080:8080
- 9600:9600
test:
build:
context: .
dockerfile: test/Dockerfile
depends_on:
logstash:
condition: service_healthy
volumes:
- .:/app