forked from eatvio/eatvio-infra
updates from main
This commit is contained in:
24
Makefile
24
Makefile
@@ -80,14 +80,17 @@ make-storage-link:
|
||||
node-frontend-deps:
|
||||
docker-compose exec php-fpm npm i --legacy-peer-deps
|
||||
|
||||
test:
|
||||
docker-compose exec php-fpm vendor/bin/paratest
|
||||
paratest-bin:
|
||||
docker-compose exec -u www-data php-fpm vendor/bin/paratest
|
||||
|
||||
paratest-artisan:
|
||||
docker-compose exec -u www-data php-fpm ./artisan test --parallel --stop-on-failure --env=testing
|
||||
|
||||
fix-insights:
|
||||
docker-compose exec php-fpm ./artisan insights --fix
|
||||
docker-compose exec php-fpm vendor/bin/phpinsights --fix --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95
|
||||
|
||||
insights:
|
||||
docker-compose exec php-fpm vendor/bin/phpinsights --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95
|
||||
docker-compose exec php-fpm vendor/bin/phpinsights --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95 --flush-cache
|
||||
|
||||
rector:
|
||||
docker-compose exec php-fpm vendor/bin/rector process --dry-run
|
||||
@@ -96,12 +99,19 @@ static-analysis:
|
||||
docker-compose exec php-fpm composer static-analysis
|
||||
|
||||
detect-magic-numbers:
|
||||
docker-compose exec php-fpm vendor/bin/phpmnd app/ tests/
|
||||
docker-compose exec -u www-data php-fpm vendor/bin/phpmnd app/ tests/
|
||||
|
||||
ci: fix-code-style detect-magic-numbers test rector insights static-analysis
|
||||
fix-web-permissions:
|
||||
docker-compose exec -T php-fpm chown -R www-data:www-data bootstrap/cache storage
|
||||
|
||||
local-ci:
|
||||
ci: fix-web-permissions fix-code-style detect-magic-numbers test rector insights static-analysis fix-web-permissions
|
||||
|
||||
local-composer-ci:
|
||||
docker-compose exec -T php-fpm composer ci
|
||||
|
||||
test: fix-web-permissions paratest-artisan
|
||||
|
||||
local-ci: fix-web-permissions local-composer-ci fix-web-permissions
|
||||
|
||||
init: clone copy-infra-env restart setup-laravel-packages copy-laravel-env setup-laravel-key run-migrations node-frontend-deps build-frontend-prod fix-permissions make-storage-link
|
||||
|
||||
|
||||
@@ -15,18 +15,22 @@ services:
|
||||
- "${SOKETI_PORT:-6001}:6001"
|
||||
- "${SOKETI_METRICS_SERVER_PORT:-9601}:9601"
|
||||
networks:
|
||||
ns-eatvio:
|
||||
ipv4_address: 172.118.0.5
|
||||
- ns-eatvio
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
restart: always
|
||||
|
||||
memcached:
|
||||
image: "memcached:alpine"
|
||||
networks:
|
||||
- ns-eatvio
|
||||
restart: always
|
||||
|
||||
mysql:
|
||||
image: "mysql:8.0"
|
||||
working_dir: /application
|
||||
networks:
|
||||
ns-eatvio:
|
||||
ipv4_address: 172.118.0.3
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
- ".:/application"
|
||||
- "./mysql_data:/var/lib/mysql"
|
||||
@@ -48,12 +52,16 @@ services:
|
||||
- TZ=Europe/Moscow
|
||||
depends_on:
|
||||
- mysql
|
||||
- worker
|
||||
- frontend
|
||||
- memcached
|
||||
- typesense
|
||||
networks:
|
||||
ns-eatvio:
|
||||
ipv4_address: 172.118.0.2
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
- "./app:/application"
|
||||
- "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini"
|
||||
- "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini"
|
||||
- "./tbank_certs:/tbank_certs"
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
restart: always
|
||||
@@ -64,9 +72,6 @@ services:
|
||||
working_dir: /application
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
depends_on:
|
||||
- mysql
|
||||
- php-fpm
|
||||
networks:
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
@@ -83,13 +88,13 @@ services:
|
||||
command: "service supervisor start"
|
||||
depends_on:
|
||||
- mysql
|
||||
- php-fpm
|
||||
networks:
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
- "./app:/application"
|
||||
- "./phpdocker/worker/php-ini-overrides.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini"
|
||||
- "./phpdocker/worker/php-ini-overrides.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini"
|
||||
- "./phpdocker/worker/laravel-worker.conf:/etc/supervisor/conf.d/laravel-worker.conf"
|
||||
- "./tbank_certs:/tbank_certs"
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
restart: always
|
||||
@@ -104,8 +109,10 @@ services:
|
||||
volumes:
|
||||
- "./app:/application"
|
||||
- "./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf"
|
||||
- "./phpdocker/nginx/shalom.eatvio.local+2.pem:/etc/nginx/shalom.eatvio.local+2.pem"
|
||||
- "./phpdocker/nginx/shalom.eatvio.local+2-key.pem:/etc/nginx/shalom.eatvio.local+2-key.pem"
|
||||
ports:
|
||||
- "1092:80"
|
||||
- "10443:5000"
|
||||
networks:
|
||||
- web
|
||||
- ns-eatvio
|
||||
@@ -121,15 +128,13 @@ services:
|
||||
ports:
|
||||
- "8082:8025"
|
||||
networks:
|
||||
ns-eatvio:
|
||||
ipv4_address: 172.118.0.4
|
||||
- ns-eatvio
|
||||
|
||||
typesense:
|
||||
image: typesense/typesense:26.0
|
||||
restart: on-failure
|
||||
networks:
|
||||
ns-eatvio:
|
||||
ipv4_address: 172.118.0.6
|
||||
- ns-eatvio
|
||||
volumes:
|
||||
- ./typesense-data:/data
|
||||
command: "--data-dir /data --api-key=typesense --enable-cors"
|
||||
@@ -139,6 +144,3 @@ networks:
|
||||
external: true
|
||||
ns-eatvio:
|
||||
external: false
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.118.0.0/28
|
||||
|
||||
@@ -4,7 +4,7 @@ upstream phpupstream {
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name dev2.eatvio.com;
|
||||
server_name shalom.eatvio.local;
|
||||
|
||||
client_max_body_size 108M;
|
||||
|
||||
@@ -40,11 +40,89 @@ server {
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name socket.eatvio.com;
|
||||
listen 5000 ssl;
|
||||
server_name localhost;
|
||||
|
||||
ssl_certificate /etc/nginx/shalom.eatvio.local+2.pem;
|
||||
ssl_certificate_key /etc/nginx/shalom.eatvio.local+2-key.pem;
|
||||
ssl_protocols TLSv1.2;
|
||||
rewrite_log on;
|
||||
error_log /dev/stdout debug;
|
||||
|
||||
charset UTF-8;
|
||||
|
||||
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-Host $server_name;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
# add_header Content-Security-Policy "default-src 'self';";
|
||||
|
||||
|
||||
server_tokens off;
|
||||
client_max_body_size 100M;
|
||||
root /application/public;
|
||||
index index.php;
|
||||
|
||||
# location ^~ /visualization/ {
|
||||
# rewrite /visualization/(.*) /$1 break;
|
||||
# proxy_pass http://imageproxy:8080;
|
||||
# }
|
||||
|
||||
# try to serve file directly, fallback to index.php
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^.*$ /index.php last;
|
||||
# }
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass phpupstream;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 5000 ssl;
|
||||
server_name socket.shalom.eatvio.local;
|
||||
|
||||
ssl_certificate /etc/nginx/shalom.eatvio.local+2.pem;
|
||||
ssl_certificate_key /etc/nginx/shalom.eatvio.local+2-key.pem;
|
||||
ssl_protocols TLSv1.2;
|
||||
|
||||
location / {
|
||||
proxy_pass http://172.118.0.5:6001;
|
||||
proxy_pass http://soketi:6001;
|
||||
proxy_read_timeout 60;
|
||||
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';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
error_log /dev/stdout info;
|
||||
access_log /dev/stdout;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name socket.shalom.eatvio.local;
|
||||
|
||||
location / {
|
||||
proxy_pass http://soketi:6001;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
Reference in New Issue
Block a user