Docker Compose Labs

Hi I am facing an issue in docker compose labs
Question 5
Create a docker-compose.yml file under the path /root/wordpress . Once done, run a docker-compose up.

The compose file should have exact specification of the wordpress and db container

attaching the screenshot of my .yml file and the error please help me out.

fixed this error but facing anther one

ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
in “./docker-compose.yml”, line 6, column 21

Why you wrote wordpress service two times. Make a space between hypen and db, apply for all.
See this post
Docker Compose Lab - #26 by Ayman

Kindly check the full solution below as player001 mentioned :

services:
 db:
   environment:
     POSTGRES_PASSWORD: mysecretpassword
   image: postgres
 wordpress:
   image: wordpress
   links:
   - db
   ports:
   - 8085:80
version: '3.0'

Also, check my try below:
check_wordpress

Sometimes the correct answer is located under path /var/answers/ as you can find the above answer inside it.

We do sorry for any inconvenience.

I hope this helps!

Thanks for the early reply. Had trouble creating the yml file.

Can you clarify more about the trouble you face so that I can help you properly ?

Actually I had trouble writing the yml file. I lacked the knowledge in yaml thats why.

@ayushjain
You can check our free course to have a good knowledge in YAML langauage and its concepts
from the link below :
https://kodekloud.com/courses/enrolled/635226

This may help people: