Allow internal connections between compose and applications by default
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
I setup postgres via compose and I'm trying to connect it to an application via internal url. However the application can't find it and I'm not sure if I need to add dokploy-network or something else to the compose file.
Compose file:
services:
db:
image: postgres:17
container_name: postgres17
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- mediacreatorprogrpcstaging-db-01e1ey
labels:
- traefik.http.routers.mediacreatorprogrpcstaging-db-01e1ey-23-web.rule=Host(`mediacreatorprogrpcstaging-db-01e1ey-b6b5cb-51-81-35-203.traefik.me`)
- traefik.http.routers.mediacreatorprogrpcstaging-db-01e1ey-23-web.entrypoints=web
- traefik.http.services.mediacreatorprogrpcstaging-db-01e1ey-23-web.loadbalancer.server.port=3000
- traefik.http.routers.mediacreatorprogrpcstaging-db-01e1ey-23-web.service=mediacreatorprogrpcstaging-db-01e1ey-23-web
- traefik.enable=true
volumes:
pgdata: null
networks:
mediacreatorprogrpcstaging-db-01e1ey:
name: mediacreatorprogrpcstaging-db-01e1ey
external: true
Describe the solution you'd like
I'm expecting it to work out of the box
Describe alternatives you've considered
I ended up setting the postgres db up as an application which can communicate with other applications. Ultimately I am doing all this as a workaround for custom domain support for databases.
Is adding dokploy-network to the compose file what's missing?
Additional context
No response
Will you send a PR to implement it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Compose file and reproduce the connection between its PostgreSQL service and an application. Trace how Compose services and applications are attached to networks, including whether dokploy-network is required; done means an application can reach the Compose database through an internal URL by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, postgresql
- Domain
- databases, devops, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100