forked from dwp/ms-fitnote-controller
/
docker-compose.yml
59 lines (56 loc) · 1.49 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
version: '2.1'
networks:
test:
services:
localstack:
container_name: localstack
image: localstack/localstack:0.11.2
environment:
SERVICES: ${LOCALSTACK_SERVICES}
HOSTNAME_EXTERNAL: ${LOCALSTACK_HOSTNAME}
healthcheck:
test: ["CMD", "curl", "http://localhost:4566/health"]
interval: 10s
timeout: 5s
retries: 10
ports:
- "4566:4566"
networks:
- test
volumes:
- ./localstack/docker-entrypoint-initaws.d:/docker-entrypoint-initaws.d
redis-cluster:
container_name: redis-cluster
image: grokzen/redis-cluster:latest
networks:
- test
ports:
- "7000-7007:7000-7007"
- "8080:8080"
healthcheck:
test: [ "CMD", "redis-cli", "-p", "7000", "ping" ]
interval: 1s
timeout: 3s
retries: 30
cucumber-tests:
image: ${MAVEN_IMAGE}
entrypoint: /bin/bash -c
command:
- |
sleep 5 #wait for keys to be created once localstack services are available (aws cli not available)
mvn clean -Dtest=uk.gov.dwp.health.fitnotecontroller.integration.RunCukesTest ${MVN_OPTS} ${MVN_CLI_OPTS} test
working_dir: /usr/src
volumes:
- .:/usr/src
- ${MVN_M2}:/root/.m2
- ${MVN_SETTINGS_FILE}:/root/.m2/settings.xml
environment:
- JVM_OPTS=-Xmx12g -Xms12g -XX:MaxPermSize=2048m
- IP=0.0.0.0
networks:
- test
depends_on:
redis-cluster:
condition: service_healthy
localstack:
condition: service_healthy