-
Notifications
You must be signed in to change notification settings - Fork 30
/
compose.yml
58 lines (52 loc) · 1.82 KB
/
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
# yaml-language-server: $schema=https://cdn.jsdelivr.net/gh/compose-spec/compose-spec@master/schema/compose-spec.json
services:
app: # common use case is to run shell or execute commands
build: &app-build {dockerfile: Dockerfile, target: develop}
environment:
HOME: /tmp
LOG_LEVEL: debug
volumes: [.:/src:rw, app-tmp-data:/tmp:rw, app-modules-cache:/var/tmp/go:rw]
security_opt: [no-new-privileges:true]
app-web-dist:
build: *app-build
user: node
volumes: [.:/src:rw]
working_dir: /src/web
command: npm run watch
healthcheck: {test: ['CMD', 'test', '-f', './dist/robots.txt'], start_interval: 1s, interval: 10s, start_period: 20s}
security_opt: [no-new-privileges:true]
app-http:
build: *app-build
entrypoint: sh -c 'go build -buildvcs=false -o /var/tmp/app ./cmd/webhook-tester/ && exec $0 "$@"'
command: /var/tmp/app start --use-live-frontend --auto-create-sessions --max-requests 8
volumes: [.:/src:rw]
ports: ['8080:8080/tcp']
healthcheck:
test: ['CMD', '/var/tmp/app', 'start', 'healthcheck']
start_interval: 1s
interval: 10s
start_period: 10s
depends_on: {app-web-dist: {condition: service_healthy}}
security_opt: [no-new-privileges:true]
redis:
image: docker.io/library/redis:7-alpine
volumes: [redis-data:/data:rw]
ports: ['6379/tcp']
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 500ms
timeout: 1s
security_opt: [no-new-privileges:true]
k6:
image: ghcr.io/grafana/k6:latest
volumes: [.:/src:ro]
working_dir: /src
environment:
BASE_URL: http://app-http:8080
K6_NO_USAGE_REPORT: 'true'
depends_on: {app-http: {condition: service_healthy}}
security_opt: [no-new-privileges:true]
volumes:
app-modules-cache: {}
app-tmp-data: {}
redis-data: {}