Answer the question
In order to leave comments, you need to log in
What should I do if welcomePage nginx opens in docker-compose instead of a website?
I myself sit on manjaro. I raise containers with this
docker-compose.yml config
version: '2'
services:
nginx:
build:
context: ./
dockerfile: docker/php-fpm.docker
volumes:
- ./:/var/www
ports:
- "8080:80"
links:
- php-fpm
php-fpm:
build:
context: ./
dockerfile: docker/php-fpm.docker
volumes:
- ./:/var/www
environment:
- "DB_PORT=3306"
- "DB_HOST=mysql"
- "REDIS_PORT=6379"
- "REDIS_HOST=redis"
links:
- mysql
- redis
mysql:
image: mysql
volumes:
- ./storage/docker/mysql:/var/lib/mysql
environment:
- "MYSQL_ROOT_PASSWORD=123456"
- "MYSQL_USER=app"
- "MYSQL_PASSWORD=123456"
- "MYSQL_DATABASE=app"
ports:
- "33061:3306"
redis:
image: redis
ports:
- "63791:6379"
FROM nginx:1.10
ADD ./docker/nginx/default.conf /etc/nginx/conf.d/default.conf
WORKDIR /var/www
server {
listen 80;
server_name localost;
index index.php index.html;
root /var/www/public;
location / {
try_files $uri /index.php?$args;
}
location /docs {
try_files $uri $uri/;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
5b719abf0af6 laravelloc_nginx "docker-php-entrypoi…" 4 seconds ago Up 3 seconds 9000/tcp, 0.0.0.0:8080->80/tcp laravelloc_nginx_1
e7c1de2377f8 laravelloc_php-fpm "docker-php-entrypoi…" 5 seconds ago Up 4 seconds 9000/tcp laravelloc_php-fpm_1
b2284c2702ee mysql "docker-entrypoint.s…" 6 seconds ago Up 4 seconds 33060/tcp, 0.0.0.0:33061->3306/tcp laravelloc_mysql_1
5e2fe0644f5a redis "docker-entrypoint.s…" 6 seconds ago Up 4 seconds 0.0.0.0:63791->6379/tcp laravelloc_redis_1
Answer the question
In order to leave comments, you need to log in
nginx:
build:
context: ./
dockerfile: docker/php-fpm.docker
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question