Answer the question
In order to leave comments, you need to log in
nginx docker container not seeing php-fpm?
Hello!
I am doing my build on docker-compose php-fpm + nginx + postgres
php-fpm in docker-compose.yml is called app, it looks like this:
app:
build:
context: .
dockerfile: Dockerfile
image: digitalocean.com/php
container_name: app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./app:/var/www
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
fastcgi_pass app:9000;
docker-compose up -d
container with nginx falls, in the logs this is:app-webserver | 2020/01/08 08:39:02 [emerg] 1#1: host not found in upstream "app" in /etc/nginx/conf.d/nginx.conf:18
app-webserver | nginx: [emerg] host not found in upstream "app" in /etc/nginx/conf.d/nginx.conf:18
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question