Accessories of Multiple Destinations on the same Machine #1153
Unanswered
JensRavens
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Did you resolve this? |
Beta Was this translation helpful? Give feedback.
1 reply
-
i'm doing something similar (dev/staging/prod) but it's much simpler to share the pg database, as pg as schemas that provide full separation, similar to what you have on heroku also for example. running seperate pg's |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everybody,
I'm trying to create a deployment where multiple environments of the same application including their accessories are deployed to the same machine (think production, staging and automatically created apps per branch).
The first issue I run into is that accessory names don't seem to take destination names into account (so my production postgres and my staging postgres become the same container). I fixed that by using different names for accessories in different destinations (which feels wrong because now I have to redeclare all accessories for every environment).
My next issue is how to access the accessory without explicitly exposing their port to localhost. Due to the (theoretically unlimited due to branches) number of accessories I can't just assign a port to them (especially if I reuse the server to deploy multiple applications with their various destinations as I would run out of port numbers at some point). My hope was to access the accessories via their docker names (which is what I used to do in a similar setup with docker compose) like this:
Then set the
DATABASE_URL
via env topostgres://postgres@app_a-production-postgres:5432/dbname
, but the host name cannot be resolved by my application.So to summarise:
Beta Was this translation helpful? Give feedback.
All reactions