I'm using the nameko from GitHub https://github.com/nameko/nameko-examples and I deploy this application on docker. Once I stop the container all the data lost and I also not able to find the location of the container. I want to store each database date on my local computer.
Asked
Active
Viewed 110 times
1 Answers
0
You have to mount storage for the postgres container. https://github.com/nameko/nameko-examples/blob/master/docker-compose.yml
postgres:
container_name: nameko-example-postgres
image: postgres
ports:
- "5433:5432" # Exposing Postgres on different port for convenience
environment:
POSTGRES_DB: "orders"
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "postgres"
restart: always
you can add columes to the above snippet by
volumes:
- ./database:/var/lib/postgresql

Gokul C
- 151
- 14