Все доброго времени.
Подскажите, как можно использовать свое доменное имя вместо 'localhost' ?
Вот базовая конфигурация:
docker-compose.ymlversion: '2'
services:
web:
build:
context: ./
dockerfile: web.docker
volumes:
- ./:/var/www/html
ports:
- "80:80"
links:
- app
app:
build:
context: ./
dockerfile: app.docker
volumes:
- ./:/var/www/html
vhost.confserver {
listen 80;
index index.php index.html;
root /var/www/html/public;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
web.dockerFROM nginx:1.10
ADD ./vhost.conf /etc/nginx/conf.d/default.conf
WORKDIR /var/www/html
app.dockerFROM php:7-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client \
&& docker-php-ext-install mcrypt pdo_mysql
WORKDIR /var/www/html