-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
104 lines (99 loc) · 2.5 KB
/
compose.yaml
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
services:
tracking:
image: jaegertracing/all-in-one:latest
deploy:
resources:
limits:
memory: 512M
cpus: 0.5
ports:
- "4317:4317" # OpenTelemetry gRPC receiver
- "4318:4318" # OpenTelemetry receiver
- "14268:14268" # Jaeger receiver
- "16686:16686" # Jaeger UI
environment:
COLLECTOR_OTLP_ENABLED: "true"
postgres:
image: postgres
deploy:
resources:
limits:
memory: 512M
cpus: 0.5
environment:
POSTGRES_USER: ${POSTGRES_USER:-app_rust}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-app_rust-password}
POSTGRES_DB: ${POSTGRES_DB:-app_rust}
volumes:
- db:/var/lib/postgresql/data
ports:
- ${POSTGRES_PORT:-5432}:5432
adminer:
image: adminer
deploy:
resources:
limits:
memory: 512M
cpus: 0.5
ports:
- ${ADMINER_PORT:-18080}:8080
environment:
ADMINER_DEFAULT_SERVER: postgres
ADMINER_DEFAULT_USERNAME: ${POSTGRES_USER:-app_rust}
ADMINER_DEFAULT_PASSWORD: ${POSTGRES_PASSWORD:-app_rust-password}
ADMINER_DESIGN: ${ADMINER_DESIGN:-dracula}
ADMINER_PLUGINS: ${ADMINER_PLUGINS:-tables-filter tinymce}
app:
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
cpus: 0.5
build:
context: .
dockerfile: Dockerfile
environment:
DB_URL: postgres://${POSTGRES_USER:-app_rust}:${POSTGRES_PASSWORD:-app_rust-password}@postgres/${POSTGRES_DB:-app_rust}
OTLP_SPAN_ENDPOINT: http://tracking:4317
OTLP_METRIC_ENDPOINT: http://tracking:4318/v1/metrics
OTLP_SERVICE_NAME: app_rust
OTLP_VERSION: 1.0.0-rc1
LOG_LEVEL: ${LOG_LEVEL:-warn}
ports:
- ${APP_PORT:-3000}:3000
depends_on:
- postgres
links:
- postgres
artillery:
image: artilleryio/artillery
command:
- "run"
- "-o"
- "/tmp/artillery/test-run-report.json"
- "/scripts/script.yaml"
volumes:
- .docker/artillery:/scripts
- .docker/tmp:/tmp/artillery
depends_on:
- app
openapi-generator-cli:
image: openapitools/openapi-generator-cli
volumes:
- ./packages:/packages
- ./openapi.yaml:/openapi.yaml:ro
command:
- generate
- -i
- /openapi.yaml
- -g
- rust-axum
- -o
- /packages/gen-server
- --package-name
- gen-server
- --additional-properties
- disableValidator=true
volumes:
db: { }