Replies: 4 comments 5 replies
-
You can take inspiration from the setup we use for testing during development:
Merge them into one file and it should be good to go: services:
apiserver:
image: dependencytrack/apiserver:4.11.5
depends_on:
- postgres
environment:
ALPINE_DATABASE_MODE: "external"
ALPINE_DATABASE_URL: "jdbc:postgresql://postgres:5432/dtrack"
ALPINE_DATABASE_DRIVER: "org.postgresql.Driver"
ALPINE_DATABASE_USERNAME: "dtrack"
ALPINE_DATABASE_PASSWORD: "dtrack"
ports:
- "127.0.0.1:8080:8080"
volumes:
- "apiserver-data:/data"
restart: unless-stopped
frontend:
image: dependencytrack/frontend:4.11.5
environment:
API_BASE_URL: "http://localhost:8080"
ports:
- "127.0.0.1:8081:8080"
restart: unless-stopped
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: "dtrack"
POSTGRES_USER: "dtrack"
POSTGRES_PASSWORD: "dtrack"
ports:
- "127.0.0.1:5432:5432"
volumes:
- "postgres-data:/var/lib/postgresql/data"
restart: unless-stopped
volumes:
apiserver-data: { }
postgres-data: { } Some instructions for PostgreSQL specific configuration are here: https://dependencytrack.github.io/hyades/latest/operations/database/#basic-configuration For a small installation you should be fine without additional config, but if performance is important to you, you should definitely have a look at that. |
Beta Was this translation helpful? Give feedback.
-
@nscuro Hi Niklas. Sorry to bother you. Setting up a new instance and DT 4.11.5 and PSQL 16-Alpine give me access denied. I tried 4.12.2 for DT as that was the latest and the same, but 4.12.1 allowed me to fail on the postgresql:16-alpine Admittedly this does not appear on the list of official images https://hub.docker.com/_/postgres so I tried 17-alpine and a whole lot more to try and pull one in and I get permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/images/create?fromImage=postresql&tag=17-alpine": dial unix /var/run/docker.sock: connect: permission denied Even just pulling them. Is there some knack to know which one will work. I have just copied the docker.yaml file we created from above that worked on the other systems at the time the previous versions were available (and so far run flawlessly thank you (I know, tempting fate!)). Any help gratefully received. |
Beta Was this translation helpful? Give feedback.
-
Now don't I feel really dumb. I knew I had set it all up and even set it so that I did not need to enter sudo for docker commands. It really, really helps if I had logged out and back in to make that work. Sorry! Please have a laugh at my expense! |
Beta Was this translation helpful? Give feedback.
-
It was even in the instructions! I have just highlighted them to make it even more obvious to a numpty like me |
Beta Was this translation helpful? Give feedback.
-
Hi, I have never used PsotgreSQL so complete newbie from that point of view. Or current method of running DT is basically the curl command to get the docker-compose.yml file, tweak the localhost to the server address to allow remote access and docker compose up-d. Works great.
Unfortunately, that uses the H2 database and every couple of months it corrupts and I have to rebuild from scratch.
I have no idea how to get DT working with PostrgreSQL. The documentation (from my point of view) is thin, particularly from a PostgreSQL newbie point of view.
Hoping someone can help as I really do not want to have to keep rebuilding it from scratch and I am the only one that knows how! It is not technically a production system, but I have a good number of people who use it for looking at vulnerabilities.
Beta Was this translation helpful? Give feedback.
All reactions