Skip to content

Instantly share code, notes, and snippets.

@ismisepaul
Created May 29, 2025 11:31
Show Gist options
  • Select an option

  • Save ismisepaul/84af94ddf3ad423d9812ab7fb9f62899 to your computer and use it in GitHub Desktop.

Select an option

Save ismisepaul/84af94ddf3ad423d9812ab7fb9f62899 to your computer and use it in GitHub Desktop.
version: '3.7'
#####################################################
# This Docker Compose file contains two services
# Dependency-Track API Server
# Dependency-Track FrontEnd
# Postgres Database
# Adminer Database Management UI
#####################################################
volumes:
dependency-track:
db:
driver: local
services:
postgresdb:
image: postgres
restart: always
environment:
- POSTGRES_USER=dtrack
- POSTGRES_PASSWORD=dtrack #TODO: change this!
ports:
- '5432:5432'
volumes:
- db:/var/lib/postgresql/data
adminer:
image: adminer
depends_on:
- postgresdb
restart: always
ports:
- 8082:8080
dtrack-apiserver:
image: dependencytrack/apiserver
depends_on:
- postgresdb
environment:
# The Dependency-Track container can be configured using any of the
# available configuration properties defined in:
# https://docs.dependencytrack.org/getting-started/configuration/
# All properties are upper case with periods replaced by underscores.
# Required properties:
- ALPINE_WORKER_THREADS=0
- ALPINE_WORKER_THREAD_MULTIPLIER=4
- ALPINE_DATA_DIRECTORY=~/.dependency-track
- ALPINE_WATCHDOG_LOGGIN_INTERVAL=0
# Database Properties
- ALPINE_DATABASE_MODE=external
- ALPINE_DATABASE_URL=jdbc:postgresql://postgresdb:5432/dtrack
- ALPINE_DATABASE_DRIVER=org.postgresql.Driver
- ALPINE_DATABASE_USERNAME=dtrack
- ALPINE_DATABASE_PASSWORD=dtrack
deploy:
resources:
limits:
memory: 12288m
reservations:
memory: 8192m
restart_policy:
condition: on-failure
ports:
- '8081:8080'
volumes:
- 'dependency-track:/data'
restart: unless-stopped
dtrack-frontend:
image: dependencytrack/frontend
depends_on:
- dtrack-apiserver
environment:
# The base URL of the API server.
# NOTE:
# * This URL must be reachable by the browsers of your users.
# * The frontend container itself does NOT communicate with the API server directly, it just serves static files.
# * When deploying to dedicated servers, please use the external IP or domain of the API server.
- API_BASE_URL=http://localhost:8081 #TODO: change your URL!
ports:
- "8080:8080"
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment