-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
128 lines (122 loc) · 3.9 KB
/
docker-compose.yml
File metadata and controls
128 lines (122 loc) · 3.9 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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This file is part of Dependency-Track.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) OWASP Foundation. All Rights Reserved.
services:
initializer:
image: ghcr.io/dependencytrack/hyades-apiserver:snapshot
container_name: dt-initializer
depends_on:
postgres:
condition: service_healthy
environment:
# The default JVM options of the image are optimized for the API server,
# i.e. longer runtime and larger heaps. Provide JVM options that are more
# suitable for one-off executions with fewer available resources.
JAVA_OPTIONS: "-Xmx256m -XX:+UseSerialGC -XX:TieredStopAtLevel=1"
DT_DATASOURCE_URL: "jdbc:postgresql://dt-postgres:5432/dtrack"
DT_DATASOURCE_USERNAME: "dtrack"
DT_DATASOURCE_PASSWORD: "dtrack"
DT_DATASOURCE_POOL_ENABLED: "false"
DT_INIT_AND_EXIT: "true"
volumes:
- "apiserver-data:/data"
restart: on-failure
apiserver:
image: ghcr.io/dependencytrack/hyades-apiserver:snapshot
container_name: dt-apiserver
depends_on:
postgres:
condition: service_healthy
initializer:
condition: service_completed_successfully
environment:
# Limit maximum heap size to 2GB.
# Default would be 90% of available memory,
# which can cause problems on some workstations.
# For production deployments, the default should be used.
EXTRA_JAVA_OPTIONS: "-Xmx2g"
DT_DATASOURCE_URL: "jdbc:postgresql://dt-postgres:5432/dtrack?reWriteBatchedInserts=true"
DT_DATASOURCE_USERNAME: "dtrack"
DT_DATASOURCE_PASSWORD: "dtrack"
DT_METRICS_ENABLED: "true"
DT_INIT_TASKS_ENABLED: "false"
ports:
- "127.0.0.1:8080:8080"
volumes:
- "apiserver-data:/data"
profiles:
- demo
restart: unless-stopped
frontend:
image: ghcr.io/dependencytrack/hyades-frontend:snapshot
container_name: dt-frontend
environment:
API_BASE_URL: "http://localhost:8080"
ports:
- "127.0.0.1:8081:8080"
profiles:
- demo
restart: unless-stopped
postgres:
image: postgres:18-alpine
container_name: dt-postgres
environment:
POSTGRES_DB: "dtrack"
POSTGRES_USER: "dtrack"
POSTGRES_PASSWORD: "dtrack"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
interval: 5s
timeout: 3s
retries: 3
ports:
- "5432:5432"
volumes:
- "postgres-data:/var/lib/postgresql/data"
restart: unless-stopped
prometheus:
image: prom/prometheus:v2.55.1
container_name: dt-prometheus
ports:
- "127.0.0.1:9090:9090"
volumes:
- "./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro,Z"
- "prometheus-data:/prometheus"
profiles:
- monitoring
restart: unless-stopped
grafana:
image: grafana/grafana-oss:11.5.1
container_name: dt-grafana
depends_on:
- prometheus
environment:
GF_SECURITY_ADMIN_USER: "admin"
GF_SECURITY_ADMIN_PASSWORD: "admin"
ports:
- "127.0.0.1:3000:3000"
volumes:
- "grafana-data:/var/lib/grafana"
- "./monitoring/grafana/dashboards:/etc/dashboards:ro,Z"
- "./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro,Z"
profiles:
- monitoring
restart: unless-stopped
volumes:
apiserver-data: { }
postgres-data: { }
grafana-data: { }
prometheus-data: { }