forked from eatvio/eatvio-infra
refactor(docker-compose, nginx.conf): remove comments, default nginx config
This commit is contained in:
@@ -41,7 +41,7 @@ services:
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
TZ: "Evrope/Moscow"
|
||||
ports:
|
||||
- "1394:3306"
|
||||
- "1094:3306"
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
restart: always
|
||||
@@ -54,9 +54,9 @@ services:
|
||||
depends_on:
|
||||
- mysql
|
||||
- worker
|
||||
# - frontend
|
||||
- frontend
|
||||
- memcached
|
||||
#- typesense
|
||||
- typesense
|
||||
networks:
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
@@ -68,21 +68,21 @@ services:
|
||||
- "traefik.enable=false"
|
||||
restart: always
|
||||
|
||||
# frontend:
|
||||
# build: phpdocker/front-end
|
||||
# command: "npm run dev"
|
||||
# working_dir: /application
|
||||
# environment:
|
||||
# - TZ=Europe/Moscow
|
||||
# #- CHOKIDAR_USEPOLLING=true
|
||||
# networks:
|
||||
# - ns-eatvio
|
||||
# volumes:
|
||||
# - "./app:/application"
|
||||
# labels:
|
||||
# - "traefik.enable=false"
|
||||
# restart: unless-stopped
|
||||
#
|
||||
frontend:
|
||||
build: phpdocker/front-end
|
||||
command: "npm run dev"
|
||||
working_dir: /application
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
#- CHOKIDAR_USEPOLLING=true
|
||||
networks:
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
- "./app:/application"
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
build: phpdocker/worker
|
||||
working_dir: /application
|
||||
@@ -113,11 +113,9 @@ services:
|
||||
volumes:
|
||||
- "./app:/application"
|
||||
- "./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf"
|
||||
#- "./phpdocker/nginx/hasan.eatvio.local+4.pem:/etc/nginx/hasan.eatvio.local+4.pem"
|
||||
#- "./phpdocker/nginx/hasan.eatvio.local+4-key.pem:/etc/nginx/hasan.eatvio.local+4-key.pem"
|
||||
ports:
|
||||
- "12443:5000"
|
||||
- "1392:80"
|
||||
- "10443:5000"
|
||||
- "1092:80"
|
||||
networks:
|
||||
- web
|
||||
- ns-eatvio
|
||||
@@ -128,12 +126,12 @@ services:
|
||||
- "traefik.port=80"
|
||||
- "traefik.protocol=http"
|
||||
|
||||
#mailhog:
|
||||
#image: "mailhog/mailhog"
|
||||
#ports:
|
||||
#- "8082:8025"
|
||||
#networks:
|
||||
#- ns-eatvio
|
||||
mailhog:
|
||||
image: "mailhog/mailhog"
|
||||
ports:
|
||||
- "8082:8025"
|
||||
networks:
|
||||
- ns-eatvio
|
||||
|
||||
typesense:
|
||||
build: ./phpdocker/typesense
|
||||
@@ -148,7 +146,16 @@ services:
|
||||
|
||||
livekit-redis:
|
||||
image: redis:7-alpine
|
||||
command: ["redis-server", "--appendonly", "no", "--maxmemory", "500mb", "--maxmemory-policy", "allkeys-lru"]
|
||||
command:
|
||||
[
|
||||
"redis-server",
|
||||
"--appendonly",
|
||||
"no",
|
||||
"--maxmemory",
|
||||
"500mb",
|
||||
"--maxmemory-policy",
|
||||
"allkeys-lru",
|
||||
]
|
||||
networks:
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
|
||||
@@ -9,46 +9,60 @@ map $http_upgrade $connection_upgrade {
|
||||
'' close;
|
||||
}
|
||||
|
||||
# 1. Основной сайт (Laravel) - делаем его default_server
|
||||
server {
|
||||
listen 80 default_server; # Добавили default_server
|
||||
server_name testing.eatv.io;
|
||||
listen 80;
|
||||
server_name my-dev.eatvio.test; # change me
|
||||
|
||||
client_max_body_size 108M;
|
||||
rewrite_log on;
|
||||
|
||||
# access_log /var/log/nginx/application.access.log;
|
||||
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stdout info;
|
||||
|
||||
root /application/public;
|
||||
index index.php;
|
||||
|
||||
# # Vite HMR
|
||||
# location /_vite {
|
||||
# proxy_pass http://frontend:5173;
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_set_header Upgrade $http_upgrade;
|
||||
# proxy_set_header Connection $connection_upgrade;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# proxy_connect_timeout 7d;
|
||||
# proxy_send_timeout 7d;
|
||||
# proxy_read_timeout 7d;
|
||||
# }
|
||||
#
|
||||
# location /build {
|
||||
# try_files $uri $uri/ =404;
|
||||
# expires 1y;
|
||||
# add_header Cache-Control "public, immutable";
|
||||
# }
|
||||
# Vite HMR WebSocket and assets
|
||||
location /_vite {
|
||||
proxy_pass http://frontend:5173;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# WebSocket support
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
# Headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
|
||||
# Timeouts
|
||||
proxy_connect_timeout 7d;
|
||||
proxy_send_timeout 7d;
|
||||
proxy_read_timeout 7d;
|
||||
}
|
||||
|
||||
# Production build assets
|
||||
location /build {
|
||||
try_files $uri $uri/ =404;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# try to serve file directly, fallback to index.php
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
#resolver 127.0.0.11;
|
||||
#set $upstream php-fpm:9000;
|
||||
#fastcgi_pass php-fpm:9000;
|
||||
# nginx will now start if host is not reachable
|
||||
fastcgi_pass phpupstream;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
@@ -59,10 +73,9 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
# 2. Soketi - меняем server_name на тот, что в traefik labels (wstesting.eatv.io)
|
||||
server {
|
||||
listen 80;
|
||||
server_name wstesting.eatv.io; # ВАЖНО: Используем поддомен для сокетов
|
||||
server_name ws-my-dev.eatvio.test; # change me
|
||||
|
||||
location / {
|
||||
proxy_pass http://soketi:6001;
|
||||
@@ -70,6 +83,7 @@ server {
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
|
||||
Reference in New Issue
Block a user