I have docker-compose.yaml file containing this data:
<code>services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: p2ostgres1
ports:
- '6000:5432'
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
</code>
<code>services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: p2ostgres1
ports:
- '6000:5432'
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
</code>
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: p2ostgres1
ports:
- '6000:5432'
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
after running docker-compose up
and making some changes to the database, i can access that database again even if I change the password in the POSTGRES_PASSWORD: p2ostgres1
field. I can access the tables and the values inside ’em.
Is that okay? is that safe?
1