Monday, 29 November 2021

composer and docker docker-compose

 

composer:
image: composer:latest
container_name: fantise_composer
volumes:
- ./src:/var/www/html
working_dir: /var/www/html
depends_on:
- php
networks:
- fantise

npm:
image: node:13.7
container_name: fantise_npm
volumes:
- ./src:/var/www/html
working_dir: /var/www/html
entrypoint: ['npm']
site:
image: library/nginx:stable
container_name: fantise_nginx
ports:
- "61141:80"
volumes:
- ./src:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- php
- mysql
 
server {
listen 80;
index index.php index.html;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html/public;
client_max_body_size 0;
location / {
try_files $uri $uri/ /index.php?$query_string;

}

location ~ \.php$ {

try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass fantise_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;

}
}

  location / {


   proxy_pass http://localhost:61141;
proxy_read_timeout 310s;
proxy_set_header Host $host;
proxy_set_header Forwarded "for=$remote_addr;proto=$scheme";
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection "";
client_max_body_size 0;
proxy_request_buffering off;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header SERVER_NAME $host

No comments:

Post a Comment