Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve entrypoint #60

Closed
davidkarlsen opened this issue Mar 2, 2021 · 4 comments · Fixed by #622
Closed

improve entrypoint #60

davidkarlsen opened this issue Mar 2, 2021 · 4 comments · Fixed by #622
Labels
enhancement New feature or request
Milestone

Comments

@davidkarlsen
Copy link

davidkarlsen commented Mar 2, 2021

Current Behavior:

https://github.com/DependencyTrack/frontend/blob/master/docker/docker-entrypoint.sh#L6
checks for a mount, this does work well with configmaps in kubernetes. Configmaps is seen as a good practice.

Proposed Behavior:

could it instead simply check that the file exists, and if it does, ignore it. Also note that in case of configmaps it is not a ordinary file, but rather a symlink:

/app/static # ls -l conf*
lrwxrwxrwx    1 root     root            18 Mar  2 19:56 config.json -> ..data/config.json
/app/static # ls -l /app/static/config.json 
lrwxrwxrwx    1 root     root            18 Mar  2 19:56 /app/static/config.json -> ..data/config.json
/app/static # ls -l /app/static/..data
lrwxrwxrwx    1 root     root            31 Mar  2 19:56 /app/static/..data -> ..2021_03_02_19_56_07.520397086
/app/static # 
@davidkarlsen davidkarlsen added the enhancement New feature or request label Mar 2, 2021
@davidkarlsen
Copy link
Author

related: #48

@davidkarlsen
Copy link
Author

davidkarlsen commented Apr 5, 2021

@namloc2001 want to have a stab at this too?

@muellerst-hg
Copy link
Contributor

muellerst-hg commented May 5, 2023

comment deleted - because I did not read docker-entrypoint.sh thoroughly

@muellerst-hg
Copy link
Contributor

muellerst-hg commented May 8, 2023

Seems there's also a regression, when nginx root dir was moved from /app to /opt/owasp/dependency-track-frontend but docker-compose was not updated. d12ddfa#diff-6e3cd4368541f4b438a0ce9dfe5b45e3a04426f80b43546092e76f088bd2e8dc

#494

muellerst-hg added a commit to muellerst-hg/dtrack-frontend that referenced this issue Jun 1, 2023
nscuro added a commit to nscuro/dependency-track-frontend that referenced this issue Oct 23, 2023
Additionally, modify the `config.json` file in place when populating it from environment variables, instead of using a temporary file.

The populated config will be logged by the entrypoint script.

Fixes DependencyTrack#60

Co-authored-by: Steffen Mueller <[email protected]>
Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added this to the 4.9.1 milestone Oct 23, 2023
nscuro added a commit to nscuro/dependency-track-frontend that referenced this issue Oct 23, 2023
Additionally, modify the `config.json` file in place when populating it from environment variables, instead of using a temporary file.

The populated config will be logged by the entrypoint script.

Fixes DependencyTrack#60

Co-authored-by: Steffen Mueller <[email protected]>
Signed-off-by: nscuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants