-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (50 loc) · 1.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (50 loc) · 1.62 KB
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
# Local dev stack for api-log: api-log built from source + a Go mock
# upstream that speaks the three protocols api-log understands.
#
# Use:
# docker compose -f deploy/dev-stack/docker-compose.yml up --build
# # then send traffic to localhost:7861 with admin token from data/admin_token
# # and query the read API at localhost:7862.
services:
mockup:
build:
context: ../..
dockerfile: tools/mockup/Dockerfile
container_name: api-log-mockup
networks: [stack]
expose: ["8888"]
healthcheck:
test: ["CMD", "/usr/local/bin/mockup", "-help"]
interval: 5s
timeout: 2s
retries: 3
start_period: 1s
api-log:
build:
context: ../..
dockerfile: Dockerfile
container_name: api-log
networks: [stack]
depends_on:
- mockup
ports:
- "7861:7861" # proxy listener (clients connect here)
- "7862:7862" # read API
environment:
APILOG_PROXY_LISTEN: ":7861"
APILOG_PROXY_UPSTREAM: "http://mockup:8888"
APILOG_API_LISTEN: ":7862"
APILOG_STORAGE_DATA_DIR: "/data"
APILOG_LOGGING_LEVEL: "info"
APILOG_TIMEOUTS_STREAM_IDLE_SECONDS: "600"
volumes:
# Bind mount (not a named volume) so the integration test can read
# the auto-generated admin_token from outside the container.
# Distroless has no shell / no `cat`, so `docker exec ... cat` is
# not an option. The Dockerfile's USER nonroot:nonroot (UID 65532)
# writes here; chmod 777 on the host side keeps that working
# regardless of which host UID runs the test.
- ./data:/data
networks:
stack:
driver: bridge