Olá amigos tudo bem ? Estou enfrentando um problema ao configurar um projeto php/laravel/nginx/ docker, ele funcionava até ontem porém agora está me retornando um erro 502 e não estou conseguindo localizar o motivo do erro sozinho, vocês podem me ajudar ?
nginx.conf
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html/public;
index index.php index.html index.htm;
server_name http://localhost;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9011;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Dockerfile
FROM wyveo/nginx-php-fpm:latest
COPY . /usr/share/nginx/html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html
RUN ln -s public html
RUN apt update;
apt install nano -y
EXPOSE 80
docker-compose.yml
version: "3.8"
services:
application:
container_name: revision_application
build: ./
ports:
- 9011:80
volumes:
- ./:/usr/share/nginx/html
restart: always
networks:
- docker
db:
image: postgres:14.0-alpine
restart: always
environment:
POSTGRES_DB: revisions
POSTGRESS_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- "./.docker/dbdata:/var/lib/postgresql/data"
networks:
- docker
networks:
docker:
driver: bridge
New contributor
theel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.