Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- #web
- frontend:
- build:
- context: ./environment/nginx
- dockerfile: ./Dockerfile
- container_name: nginx_software
- restart: always
- ports:
- - 80:80
- volumes:
- - ./environment/nginx/nginx.conf:/etc/nginx/nginx.conf
- links:
- - php
- php:
- build:
- context: ./environment/php
- args:
- version: 7.3-fpm
- dockerfile: ./Dockerfile
- container_name: php_software
- restart: always
- ports:
- - 9000:9000
- volumes:
- - ./api:/var/www/software:cached
- links:
- - mysql
- mysql:
- build:
- context: ./environment/mysql
- args:
- version: 5.7
- dockerfile: ./Dockerfile
- container_name: mysql_software
- command: --default-authentication-plugin=mysql_native_password
- restart: always
- ports:
- - 3306:3306
- volumes:
- - ./environment/mysql/data:/var/lib/mysql
- environment:
- MYSQL_ROOT_PASSWORD: software
- MYSQL_DATABASE: software
- MYSQL_USER: software
- MYSQL_PASSWORD: software
- user nginx;
- worker_processes 1;
- error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- events {
- }
- http {
- include /etc/nginx/mime.types;
- server {
- listen 80;
- listen [::]:80;
- server_name software.test;
- root /usr/share/nginx/html/software;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- #add_header X-Content-Type-Options "nosniff";
- index index.html;
- location / {
- try_files $uri $uri/ =404;
- }
- charset utf-8;
- }
- server {
- listen 80;
- listen [::]:80;
- server_name api.software.test;
- root /var/www/software/public;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- #add_header X-Content-Type-Options "nosniff";
- index index.php;
- charset utf-8;
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- }
- error_page 404 /index.php;
- location ~ .php$ {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
- fastcgi_pass php:9000;
- fastcgi_index index.php;
- }
- location ~ /.(?!well-known).* {
- deny all;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement