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
Ayman
May 31, 2020, 12:48pm
#4
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:
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.
Ayman
May 31, 2020, 5:08pm
#6
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.
Ayman
June 5, 2020, 12:11am
#8
@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