Replies: 1 comment 1 reply
-
|
The main reason you can't see the PostgreSQL data in the deploy folder's docker-compose setup is that the PostgreSQL service there does not expose its port to the host. This means you can't access the database directly from outside the Docker network (for example, with a local database tool), even though the data is persisted correctly via Docker volumes and is accessible to other containers in the same network. In contrast, the "normal" service setup explicitly exposes port 5432, making it visible to your host system and external tools (source). If you need to access the database from your host, add a ports section to the db service in deploy/docker-compose.yml, like: ports:
- "5432:5432"This will make the database accessible from outside Docker, similar to the example setup (source). If you only need container-to-container access (e.g., backend to database), the current setup is fine and your data is still persisted via the volume (source). To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I can't see the data of postgresql deployed in the deploy folder's docker-compose.yml whose the frontend and backend service are separated,but I can see the data of postgresql deployed in the normal service whose the service and database service are just separated.
Beta Was this translation helpful? Give feedback.
All reactions