-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
156 lines (147 loc) · 4.26 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
services:
lambda-create:
image: lpa-store/lambda/api-create
depends_on:
localstack:
condition: service_healthy
build:
context: .
dockerfile: ./lambda/Dockerfile
args:
- DIR=create
environment:
AWS_REGION: eu-west-1
AWS_BASE_URL: http://localstack:4566
AWS_ACCESS_KEY_ID: localstack
AWS_SECRET_ACCESS_KEY: localstack
DDB_TABLE_NAME_DEEDS: deeds
DDB_TABLE_NAME_CHANGES: changes
S3_BUCKET_NAME_ORIGINAL: opg-lpa-store-static-eu-west-1
EVENT_BUS_NAME: local-main
JWT_SECRET_KEY_ARN: local/jwt-key
volumes:
- "./lambda/.aws-lambda-rie:/aws-lambda"
entrypoint: /aws-lambda/aws-lambda-rie /var/task/main
lambda-update:
image: lpa-store/lambda/api-update
depends_on:
localstack:
condition: service_healthy
build:
context: .
dockerfile: ./lambda/Dockerfile
args:
- DIR=update
environment:
AWS_REGION: eu-west-1
AWS_BASE_URL: http://localstack:4566
AWS_ACCESS_KEY_ID: localstack
AWS_SECRET_ACCESS_KEY: localstack
DDB_TABLE_NAME_DEEDS: deeds
DDB_TABLE_NAME_CHANGES: changes
EVENT_BUS_NAME: local-main
JWT_SECRET_KEY_ARN: local/jwt-key
volumes:
- "./lambda/.aws-lambda-rie:/aws-lambda"
entrypoint: /aws-lambda/aws-lambda-rie /var/task/main
lambda-get:
image: lpa-store/lambda/api-get
depends_on:
localstack:
condition: service_healthy
build:
context: .
dockerfile: ./lambda/Dockerfile
args:
- DIR=get
environment:
AWS_REGION: eu-west-1
AWS_BASE_URL: http://localstack:4566
AWS_ACCESS_KEY_ID: localstack
AWS_SECRET_ACCESS_KEY: localstack
DDB_TABLE_NAME_DEEDS: deeds
DDB_TABLE_NAME_CHANGES: changes
EVENT_BUS_NAME: local-main
JWT_SECRET_KEY_ARN: local/jwt-key
volumes:
- "./lambda/.aws-lambda-rie:/aws-lambda"
entrypoint: /aws-lambda/aws-lambda-rie /var/task/main
lambda-getlist:
image: lpa-store/lambda/api-getlist
depends_on:
localstack:
condition: service_healthy
build:
context: .
dockerfile: ./lambda/Dockerfile
args:
- DIR=getlist
environment:
AWS_REGION: eu-west-1
AWS_BASE_URL: http://localstack:4566
AWS_ACCESS_KEY_ID: localstack
AWS_SECRET_ACCESS_KEY: localstack
DDB_TABLE_NAME_DEEDS: deeds
DDB_TABLE_NAME_CHANGES: changes
EVENT_BUS_NAME: local-main
JWT_SECRET_KEY_ARN: local/jwt-key
volumes:
- "./lambda/.aws-lambda-rie:/aws-lambda"
entrypoint: /aws-lambda/aws-lambda-rie /var/task/main
apigw:
depends_on: [lambda-create, lambda-update, lambda-get, lambda-getlist]
build:
context: .
dockerfile: ./mock-apigw/Dockerfile
ports:
- 9000:8080
localstack:
image: localstack/localstack:4.0
ports:
- "4566:4566"
volumes:
- "./localstack/init:/etc/localstack/init/ready.d"
- "./localstack/wait:/scripts/wait"
environment:
AWS_DEFAULT_REGION: eu-west-1
healthcheck:
test: bash /scripts/wait/healthcheck.sh
interval: 10s
timeout: 10s
retries: 50
go-lint:
image: golangci/golangci-lint:v1.61.0
working_dir: /go/src/app
volumes:
- ./:/go/src/app
command: golangci-lint run --timeout 5m --out-format=colored-line-number ./lambda/get/... ./lambda/create/... ./lambda/update/...
gosec:
image: securego/gosec:2.21.4
working_dir: /app
volumes:
- .:/app
command: -exclude-dir=.gocache -fmt sarif -out /app/results.sarif /app/...
pact-verifier:
image: pactfoundation/pact-ref-verifier
entrypoint:
- pact_verifier_cli
- --hostname=apigw
- --port=8080
- --base-path=/
- --broker-url=https://pact-broker.api.opg.service.justice.gov.uk/
- --provider-name=data-lpa-store
- --state-change-url=http://apigw:8080/_pact_state
fixtures:
image: lpa-store/fixtures
build:
context: .
dockerfile: ./fixtures/Dockerfile
ports:
- "5000:8080"
environment:
- SKIP_AUTH=1
- BASE_URL=http://apigw:8080
- JWT_SECRET_KEY=mysupersecrettestkeythatis128bits
volumes:
- ./fixtures/static/js:/app/static/js
- ./docs/schemas:/app/static/schemas