Skip to content
Snippets Groups Projects
Verified Commit 9606ffaf authored by Jan-Niclas Strüwer's avatar Jan-Niclas Strüwer
Browse files

install instructions

parent e6f9ff8f
No related branches found
No related tags found
No related merge requests found
...@@ -2,4 +2,20 @@ ...@@ -2,4 +2,20 @@
## Setup ## Setup
To run the application the `OPENCODE_TOKEN` environment variable must be set. 1. Build all docker images in the `tools` folder. Make sure the container name matches the name expected in the
\ No newline at end of file corresponding launch script in `resources/scripts` (usually matches the folder name of the tool).
2. Start the database docker service in `tools/db`.
3. Set the necessary environment variables (the following shows examples):
```
OPENCODE_GITLAB_TOKEN=XXX
GIT_PROJECT_PATH=/tmp/opencode
DB_URL=jdbc:postgresql://localhost:5432/dataprovider
DB_USER=sa
DB_PW=password
```
Make sure that the db settings match the values in the database dockerfile!
If you are using IntelliJ for development it is easiest to create a `.env` file in the `resources` folder.
This file is automatically loaded by the IDE.
\ No newline at end of file
#!/bin/sh #!/bin/sh
DC_VERSION="latest"
DC_DIRECTORY=${1}/odc DC_DIRECTORY=${1}/odc
DC_PROJECT="dependency-check scan: ${2}" DC_PROJECT="dependency-check scan: ${2}"
DATA_DIRECTORY="/tmp/opencode/data" DATA_DIRECTORY="/tmp/opencode/data" # TODO: make this configurable !
CACHE_DIRECTORY="/tmp/opencode/data/cache" CACHE_DIRECTORY="/tmp/opencode/data/cache" # TODO: make this configurable !
if [ ! -d "$DATA_DIRECTORY" ]; then if [ ! -d "$DATA_DIRECTORY" ]; then
echo "Initially creating persistent directory: $DATA_DIRECTORY" echo "Initially creating persistent directory: $DATA_DIRECTORY"
...@@ -15,8 +14,6 @@ if [ ! -d "$CACHE_DIRECTORY" ]; then ...@@ -15,8 +14,6 @@ if [ ! -d "$CACHE_DIRECTORY" ]; then
mkdir -p "$CACHE_DIRECTORY" mkdir -p "$CACHE_DIRECTORY"
fi fi
# Make sure we are using the latest version
#docker pull owasp/dependency-check:$DC_VERSION
docker run --rm \ docker run --rm \
--volume "${2}":/src:z \ --volume "${2}":/src:z \
......
## Example Usage:
docker run -v /tmp/data-provider:/code detekt --input /code/src --report sarif:/code/reports/detekt.sarif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.