question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing working directory parameter through REPOSILITE environment variable fails

See original GitHub issue

What happened?

Passing working directory parameter through REPOSILITE environment variable fails :

$ docker run -it -p 8080:8080 -v /path/to/home:/home -e REPOSILITE_OPTS='--working-directory=/home' dzikoysk/reposilite:3.0.0-rc.2

Reposilite version

3.x

Relevant log output

/Users/i303934/SAPDevelop/Products/reposilite/git/reposilite/home:/home -e REPOSILITE_OPTS='--working-directory=/home' dzikoysk/reposilite:3.0.0-rc.2
option '--working-directory' (<workingDirectoryName>) should be specified only once
Usage: reposilite [-dv] [--help] [-gc=<configurationRequested>] [-h=<hostname>]
                  [-lc=<localConfigurationFile>]
                  [-lcm=<localConfigurationMode>] [--level=<level>] [-p=<port>]
                  [-sc=<sharedConfigurationFile>] [-wd=<workingDirectoryName>]
                  [-t=<tokenEntries>]...
  -d, --debug, --test-env   Enable test mode
      -gc, --generate-configuration=<configurationRequested>
                            Generate default template of the configuration
                              file. Supported templates:
                            configuration.cdn - Local configuration file
                            configuration.shared.json - Shared configuration
                              file
  -h, --hostname=<hostname> Override hostname from configuration
      --help                Display help message
      -lc, --local-config, --local-configuration=<localConfigurationFile>
                            Set custom location of local configuration file
      -lcm, --local-config-mode, 
        --local-configuration-mode=<localConfigurationMode>
                            Supported local configuration modes:
                            auto - process and override main configuration file
                            none - disable automatic updates of configuration
                              file
      --level, --channel=<level>
                            Default logging channel
  -p, --port=<port>         Override port from configuration
      -sc, --shared-config, --shared-configuration=<sharedConfigurationFile>
                            Set custom location of shared configuration file
  -t, --token=<tokenEntries>
                            Create temporary token with the given credentials
                              in name:secret format
                            Created token has all permissions
  -v, --version             Display current version of reposilite
      -wd, --working-directory=<workingDirectoryName>
                            Set custom working directory of application instance
Exception in thread "main" kotlin.UninitializedPropertyAccessException: lateinit property workingDirectory has not been initialized
	at com.reposilite.ReposiliteParameters.getWorkingDirectory(ReposiliteParameters.kt:42)
	at com.reposilite.configuration.local.LocalConfigurationFactory.createLocalConfiguration(LocalConfigurationFactory.kt:28)
	at com.reposilite.ReposiliteFactory.createReposilite(ReposiliteFactory.kt:38)
	at com.reposilite.ReposiliteFactory.createReposilite(ReposiliteFactory.kt:35)
	at com.reposilite.ReposiliteLauncherKt.createWithParameters(ReposiliteLauncher.kt:41)
	at com.reposilite.ReposiliteLauncherKt.main(ReposiliteLauncher.kt:22)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
guiliguilicommented, Jun 27, 2022

Let me give you some more context. I am trying to deployment reposilite to Azure Web App Service. I tried to configure external volumes in Azure App Service, but due the following limitation, it cannot be used with sqlite : https://github.com/MicrosoftDocs/azure-docs/issues/47130 So the only I have right now is to use Use persistent shared storage in Azure App Service which makes the /homedirectory persistent. That’s why I need be able to specify a different working directory.

I have created the following PR to fix the issue : https://github.com/dzikoysk/reposilite/pull/1438

0reactions
dzikoyskcommented, Jun 27, 2022

You can use MySQL/PostgreSQL if you’re having issues with local storage in your env 🤔 Or check if H2 works better in such case if you really need to use local target.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy fails with 401 Unauthorized · Issue #316 - GitHub
Just started Reposilite on my desktop, re-configured my <scm> connection in the POM, but the issue is the same, path (/, /snapshots, /snapshots/) ......
Read more >
Configuration - Reposilite
There are two ways to pass custom properties to your Reposilite instance: Through the reposilite.cdn configuration file; Using the system properties ...
Read more >
Git - git Documentation
Pass a configuration parameter to the command. The value given will override ... It can be an absolute path or relative path to...
Read more >
how to address files in GitHub action without using ...
First, your GitHub Action can define and take a parameter, as see in actions/cat-for-github-actions : that does not use an environment ...
Read more >
Environment variables - Rush.js
The original working directory (where the Rush command was invoked) is assigned to the the child process's RUSH_INVOKED_FOLDER environment variable, in case it ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found