Developing an app that depends on an app which doesn't have exports.sh

Hi, I’m making an app that depends on LNBits (a proxy that will allow to connect to your LNBits via Holesail).

In the umbral-apps repo, LNbits does not have an “exports.sh” file. It’s docker-compose.yml contains:

services:
  app_proxy:
    environment:
      APP_HOST: lnbits_web_1
      APP_PORT: 3007
      PROXY_AUTH_ADD: "false"

Suppose I’ll add lnbits to my umbral-app.yml’s dependencies. I want to define in my app’s docker-compose.yml the environment variables “LNBITS_TARGET_ADDRESS” and “LNBITS_TARGET_PORT” to point to the LNbits app.

Should I define them directly to “lnbits_web_1” and “3007”? Or will there already be environment variables that I could use, like: LNBITS_TARGET_ADDRESS: APP_LNBITS_IP, LNBITS_TARGET_PORT: APP_LNBITS_PORT?

Or should I add an exports.sh file to the lnbits dir? And if so, what should it contain?

Thanks!

Hey! I think you can just use lnbits_web_1 and port 3007. Don’t think the extra exports.sh is needed in this case.

Hi @lack! How do we persist the environment variables so they do not get wiped when an update occurs? I’ve heard of exports.sh, but it does not seem to work for my app.

Hey @BlurXtRa!

To keep your environment variables safe across updates, you’ll need to tweak the docker-compose.yml file or set up custom config files for your app.

The exports.sh trick won’t work here, but you can manually define your environment variables right in the app’s service section.

Another option is using volume mounts or external config files to ensure they stick around after updates.

1 Like

What @denny said. Right now there is now official way to preserve changes to the docker-compose.yml file.

So on an update you would need to change it again.

1 Like