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.

Docker (-Compose) deployment with environment not possible

See original GitHub issue

What happened?

I’m trying to deploy Reposilite using Docker-Compose together with a postgresql database.

I’m using the -Dreposilite.property=value syntax to configure the properties. However, it fails as soon as there are spaces in a value. I’ve tried quoting the value, escaping the spaces and quoting the complete -D... parameter. Nothing worked. After playing around a while, I found that the values were passed unquoted in the ENTRYPOINT command, which seems to fail with a “Main class not found” error. After overriding the entry point in the docker-compose.yml and quoting it there, it seems to work - at least it launches. However, it seems like the values seem to be ignored. At least Reposilite still used an SQLite and the HTML meta tags still contained the default title etc. instead of the customized values.

Reposilite version

3.x

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dzikoyskcommented, Feb 28, 2022

Yes, should be fine 😃

0reactions
ffriedcommented, Feb 28, 2022

Ah, thanks! Does this also work for only “partial” overrides? e.g. leave most of the settings to their defaults but customize a few of them? Can I simply put the ones I’d like to modify in the file and they will override the defaults?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Environment variables in Compose | Docker Documentation
It's possible to use environment variables in your shell to populate ... If an environment variable is not set, Compose substitutes with an...
Read more >
docker-compose does not set environment variables #7423
And I found that environment variables are working only from .env file placed in the folder where the docker-compose command is executed ( ......
Read more >
How to Use Docker Environment Variables in Docker Compose
Docker Compose allows us to pass environment variables in via command line or to define them in our shell. However, it's best to...
Read more >
Taking Advantage of the docker-compose Environment ...
This tutorial teaches you how to use docker-compose environment variables ... And not every configuration in your containers will be unique.
Read more >
A complete guide to using environment variables and files ...
A complete guide to using environment variables and files with Docker and Compose. Keep your containers secure and flexible with this easy tutorial....
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