before you mark this question as duplicate, I have looked in a lot of threads and none of them are solving the problem.
here is my docker compose file:
version: '3'
services:
# nginx
nginx:
build : ./nginx
volumes:
- ./site:/var/www/html
ports:
- '8080:80'
depends_on:
php
# database
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: bedrock123
MYSQL_DATABASE: xyz
MYSQL_USER: iamuser
MYSQL_PASSWORD: iampass
networks:
- wpsite
# php
php:
image: php:latest
volumes:
- ./site:./var/www/html
I am aware of probable indentation faults, and I did check for them but that doesn't seem to solve the problem.