Postgres password for docker compose lab

Docker compose lab:-

‘’
Create a docker-compose.yml file under the path /root/wordpress . Once done, run a docker-compose up.

Service Name: wordpress , Image: wordpress . Service Name: db , Image: postgres .

db container running with env variable POSTGRES_PASSWORD=mysecretpassword?

‘’

After writing docker-compose.yml - I am running this command to make postgres up . Kindly suggest if it is correct. Do I have to use different password.

I am struggling with this lab - kindly help. I have attached 3 screen shots.

db container running with env variable POSTGRES_PASSWORD=mysecretpassword?

Hello @anupam_bit2004,
please edit your docker-compose.yml file to be like this:

services:
db:
environment:
POSTGRES_PASSWWORD: mysecretpassword
image: postgres
wordpress:
image: wordpress
links:
- db
ports:
- 8085:80
version: ‘3.0’

I just checked this and the checks are passing now.

Thanks

You are welcome.
Happy learning!