generated from noi-techpark/java-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
66 lines (61 loc) · 1.37 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
# SPDX-FileCopyrightText: NOI Techpark <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
services:
app:
build:
dockerfile: infrastructure/docker/Dockerfile
context: .
target: dev
env_file:
- .env
volumes:
- ./src:/code
- pkg:/go/pkg/mod
- ./src/provider/testdata/skyalps.xml:/shared/skyalps.xml
working_dir: /code
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 5s
tty: true
ports:
- ${SERVER_PORT}:8080
# Runs xml validation
validate:
depends_on:
app:
condition: service_healthy
profiles: [validate]
build:
dockerfile_inline: |
FROM alpine:latest
RUN apk add --no-cache bash curl libxml2-utils
environment:
ENDPOINT: app:8080
TMPFILE: /val/test/validate.xml
entrypoint: ./validate.sh
working_dir: /val/test
volumes:
- ./:/val
# Runs unit tests
test:
build:
dockerfile: infrastructure/docker/Dockerfile
context: .
target: test
profiles: [test]
working_dir: /code
volumes:
- ./src:/code
- pkg:/go/pkg/mod
tty: true
swagger:
profiles: [swagger]
image: swaggerapi/swagger-ui:v5.17.4
ports:
- 8001:8080
environment:
URL: http://localhost:8000/apispec
attach: false
volumes:
pkg: