Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #graduate.conf
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- server_name ${NGINX_HOST};
- index index.php index.html;
- error_log /var/log/nginx/error.log;
- access_log /var/log/nginx/access.log;
- root /var/www/html/public;
- location /docs {
- autoindex on;
- autoindex_exact_size off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass php:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- }
- }
- #docker-compose.yml
- version: '3'
- services:
- web:
- image: nginx:alpine
- volumes:
- - "./docker/nginx/graduate.conf:/etc/nginx/conf.d/default.template"
- #- "./docker/ssl:/etc/ssl"
- - "./:/var/www/html"
- ports:
- - "8000:80"
- - "3000:443"
- environment:
- - NGINX_HOST=${NGINX_HOST}
- command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
- restart: always
- depends_on:
- - php
- - mysqldb
- php:
- image: nanoninja/php-fpm:${PHP_VERSION}
- restart: always
- volumes:
- - "./docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- - "./:/var/www/html"
- environment:
- - "DB_PORT=3306"
- - "DB_HOST=mysql"
- depends_on:
- - mysqldb
- # php-cli:
- # image: php-cli:alpine
- # restart: always
- # volumes:
- # - "./:/var/www/html"
- # env_file:
- # - ".env"
- # environment:
- # - "DB_PORT=3306"
- # - "DB_HOST=mysqldb"
- # tty: true
- mysqldb:
- image: mysql:${MYSQL_VERSION}
- container_name: ${MYSQL_HOST}
- restart: always
- env_file:
- - ".env"
- environment:
- - MYSQL_DATABASE=${MYSQL_DATABASE}
- - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- - MYSQL_USER=${MYSQL_USER}
- - MYSQL_PASSWORD=${MYSQL_PASSWORD}
- ports:
- - "8989:3306"
- volumes:
- - "./storage/db/mysql:/var/lib/mysql"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement