-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-base.yaml
More file actions
65 lines (63 loc) · 1.72 KB
/
docker-compose-base.yaml
File metadata and controls
65 lines (63 loc) · 1.72 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
55
56
57
58
59
60
61
62
63
64
65
# Docker Compose Configuration
# visit https://docs.docker.com/compose/
version: '3.8'
services:
# app service for your backend
inventory:
restart: unless-stopped
healthcheck:
test: >
curl -f -X GET http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
build:
context: ./
target: production
environment:
DATABASE_URI: mongodb://inventory-db:27017
OTEL_TRACES_EXPORTER: none
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4318"
OTEL_NODE_RESOURCE_DETECTORS: env,host,os
OTEL_SERVICE_NAME: inventory
OTEL_SEMCONV_STABILITY_OPT_IN: http
NODE_OPTIONS: --require @opentelemetry/auto-instrumentations-node/register
depends_on:
- inventory-db
inventory-db:
image: mongo:6.0
hostname: inventory-db
restart: always
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
volumes:
- inventory-db-data:/data/db
command: mongod --replSet rs0 --bind_ip_all
mongosetup:
image: mongo:6.0
depends_on:
- inventory-db
restart: "no"
entrypoint: [ "bash", "-c", "sleep 10 && mongosh --host inventory-db:27017 --eval 'rs.initiate()'"]
inventory-dapr:
image: "daprio/daprd:edge"
network_mode: "service:inventory"
command:
[
"./daprd",
"--app-id",
"inventory",
"--app-port",
"${EXPERIMENT_CONFIG_SIDECAR_PORT:-8080}",
"--dapr-http-port",
"3500",
"-placement-host-address",
"placement:50006",
"--config",
"/config.yaml",
"--resources-path",
"/components",
]
volumes:
inventory-db-data: