I have docker-compose.yml which looks like this.
version: "3.6"
services:
php:
build: './php/'
ports:
- 9000:9000
networks:
- backend
volumes:
- .\puppet_projects\pname\pname:/var/www/html/pname
apache_pname:
build: './apache/'
depends_on:
- php
ports:
- "80:80"
networks:
- frontend
- backend
volumes:
- .\puppet_projects\pname\pname:/var/www/html/pname
networks:
frontend:
backend:
And when I am starting docker-compose up project works properly but after changing php to ie. php_pname I am receiving 503 Site Unavailable
version: "3.6"
services:
php_pname:
build: './php/'
ports:
- 9000:9000
networks:
- backend
volumes:
- .\puppet_projects\pname\pname:/var/www/html/pname
apache_pname:
build: './apache/'
depends_on:
- php_pname
ports:
- "80:80"
networks:
- frontend
- backend
volumes:
- .\puppet_projects\pname\pname:/var/www/html/pname
networks:
frontend:
backend:
What couses error. How can I fix it? Do I have to set up service name to php without changing it?