Answer the question
In order to leave comments, you need to log in
How to force docker postgres to watch the database locally, and not from the container?
Hello!
I run docker-compose and the database is without tables. How to make reading and changing data from a local database, where everything is?
version: "3"
services:
db:
image: postgres:latest
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_DB: docker
volumes:
- ./db:/var/lib/pgsql/data //слева лежит реальная база, нужно ли так?
ports:
- "5432:5432"
restart: always
server:
image: node:latest
command: sh -c "npm install && npm run dev"
volumes:
- ./backend:/usr/src/client
working_dir: /usr/src/client
ports:
- "9001:9001"
restart: always
tty: true
links:
- db
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question