-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-test.yml
59 lines (57 loc) · 1.98 KB
/
docker-compose-test.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
version: "3.8"
services:
datapump_test:
build:
context: .
args:
- ENV=test
container_name: datapump_test
volumes:
- ./tests:/app/tests
- ./terraform:/app/terraform
- ./src:/app/src
- /var/run/docker.sock:/var/run/docker.sock:ro
entrypoint: /app/tests/run_tests.sh
environment:
- AWS_ACCESS_KEY_ID=testing # pragma: allowlist secret
- AWS_SECRET_ACCESS_KEY=testing # pragma: allowlist secret
- AWS_SECURITY_TOKEN=testing # pragma: allowlist secret
- AWS_SESSION_TOKEN=testing # pragma: allowlist secret
- AWS_DEFAULT_REGION=us-east-1 # pragma: allowlist secret
- DUMP_TO_STDOUT=$DUMP_TO_STDOUT
- DEBUG=1
- GOOGLE_APPLICATION_CREDENTIALS=/tmp/.gcs/private_key.json
- S3_BUCKET_PIPELINE=gfw-pipelines-test
- S3_BUCKET_DATA_LAKE=gfw-data-lake-test
depends_on:
- localstack
- mock_server
localstack:
container_name: localstack
image: localstack/localstack:2.2.0
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- SERVICES=cloudformation,cloudwatch,dynamodb,ec2,emr,events,iam,lambda,s3,secretsmanager,stepfunctions,sts
- DEBUG=1
- DISABLE_EVENTS=1
- LAMBDA_DOCKER_NETWORK=gfw-datapump_test_default
- HOSTNAME_EXTERNAL=localstack
- LAMBDA_KEEPALIVE_MS=0
- PERSISTENCE=${PERSISTENCE-}
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "${TMPDIR:-./localstack}:/tmp/localstack"
- '/var/run/docker.sock:/var/run/docker.sock'
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
mock_server:
image: mockserver/mockserver:mockserver-5.15.0
ports:
- "1080:1080"
environment:
MOCKSERVER_INITIALIZATION_JSON_PATH: /mock_server/mock_responses.json
volumes:
- type: bind
source: ./tests/files/mock_server
target: /mock_server