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

Docker and database docker name #181

Open
Merrick28 opened this issue Nov 2, 2022 · 4 comments
Open

Docker and database docker name #181

Merrick28 opened this issue Nov 2, 2022 · 4 comments

Comments

@Merrick28
Copy link

Hello,

I'd like to use this with docker, but I already have a container named "db" for another database.
Is it possible to use an environemnt variable to specify the name of the database host ?

@couladin
Copy link

couladin commented Feb 3, 2023

You can just rename it, but if you're deploying it in a combined stack - like the reader-distribution-docker/docker-compose.yml config file does - there's no need to change service names. If you do change it, you'll also need to change references to it ('links' section in the web service).

I would suggest removing the network_mode lines, as bridged mode is rarely needed. I prefer my stacks/containers to deploy into their own subnets, and you can still access it from the IP of the device you're running Docker on.

FWIW, I just spent 15 minutes setting this up for the first time, without issues. Made a bunch of changes to the above config, deployed it with Portainer to my NAS. Trial and error, and referring to the Compose file version 3 reference, is worth the time and head-scratching. :)

@Merrick28
Copy link
Author

Yes, I managed to make it work, but it should be easier. The user should just set an env variable with the database name/host/user/login, just as many other containers

@Merrick28
Copy link
Author

My bad, I just saw the project was almost dead...

@jendib
Copy link
Member

jendib commented Feb 3, 2023

It's not dead by any mean. It's in a fairly stable state so quite few updates, but anyone can contribute new features (and some have).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants