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:
|
node-frontend-deps:
|
||||||
docker-compose exec php-fpm npm i --legacy-peer-deps
|
docker-compose exec php-fpm npm i --legacy-peer-deps
|
||||||
|
|
||||||
test:
|
paratest-bin:
|
||||||
docker-compose exec php-fpm vendor/bin/paratest
|
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:
|
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:
|
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:
|
rector:
|
||||||
docker-compose exec php-fpm vendor/bin/rector process --dry-run
|
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
|
docker-compose exec php-fpm composer static-analysis
|
||||||
|
|
||||||
detect-magic-numbers:
|
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
|
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
|
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_PORT:-6001}:6001"
|
||||||
- "${SOKETI_METRICS_SERVER_PORT:-9601}:9601"
|
- "${SOKETI_METRICS_SERVER_PORT:-9601}:9601"
|
||||||
networks:
|
networks:
|
||||||
ns-eatvio:
|
- ns-eatvio
|
||||||
ipv4_address: 172.118.0.5
|
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=false"
|
- "traefik.enable=false"
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
|
memcached:
|
||||||
|
image: "memcached:alpine"
|
||||||
|
networks:
|
||||||
|
- ns-eatvio
|
||||||
|
restart: always
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: "mysql:8.0"
|
image: "mysql:8.0"
|
||||||
working_dir: /application
|
working_dir: /application
|
||||||
networks:
|
networks:
|
||||||
ns-eatvio:
|
- ns-eatvio
|
||||||
ipv4_address: 172.118.0.3
|
|
||||||
volumes:
|
volumes:
|
||||||
- ".:/application"
|
- ".:/application"
|
||||||
- "./mysql_data:/var/lib/mysql"
|
- "./mysql_data:/var/lib/mysql"
|
||||||
@@ -48,12 +52,16 @@ services:
|
|||||||
- TZ=Europe/Moscow
|
- TZ=Europe/Moscow
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
|
- worker
|
||||||
|
- frontend
|
||||||
|
- memcached
|
||||||
|
- typesense
|
||||||
networks:
|
networks:
|
||||||
ns-eatvio:
|
- ns-eatvio
|
||||||
ipv4_address: 172.118.0.2
|
|
||||||
volumes:
|
volumes:
|
||||||
- "./app:/application"
|
- "./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:
|
labels:
|
||||||
- "traefik.enable=false"
|
- "traefik.enable=false"
|
||||||
restart: always
|
restart: always
|
||||||
@@ -64,9 +72,6 @@ services:
|
|||||||
working_dir: /application
|
working_dir: /application
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Moscow
|
- TZ=Europe/Moscow
|
||||||
depends_on:
|
|
||||||
- mysql
|
|
||||||
- php-fpm
|
|
||||||
networks:
|
networks:
|
||||||
- ns-eatvio
|
- ns-eatvio
|
||||||
volumes:
|
volumes:
|
||||||
@@ -83,13 +88,13 @@ services:
|
|||||||
command: "service supervisor start"
|
command: "service supervisor start"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
- php-fpm
|
|
||||||
networks:
|
networks:
|
||||||
- ns-eatvio
|
- ns-eatvio
|
||||||
volumes:
|
volumes:
|
||||||
- "./app:/application"
|
- "./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"
|
- "./phpdocker/worker/laravel-worker.conf:/etc/supervisor/conf.d/laravel-worker.conf"
|
||||||
|
- "./tbank_certs:/tbank_certs"
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=false"
|
- "traefik.enable=false"
|
||||||
restart: always
|
restart: always
|
||||||
@@ -104,8 +109,10 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "./app:/application"
|
- "./app:/application"
|
||||||
- "./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf"
|
- "./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:
|
ports:
|
||||||
- "1092:80"
|
- "10443:5000"
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
- ns-eatvio
|
- ns-eatvio
|
||||||
@@ -121,15 +128,13 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8082:8025"
|
- "8082:8025"
|
||||||
networks:
|
networks:
|
||||||
ns-eatvio:
|
- ns-eatvio
|
||||||
ipv4_address: 172.118.0.4
|
|
||||||
|
|
||||||
typesense:
|
typesense:
|
||||||
image: typesense/typesense:26.0
|
image: typesense/typesense:26.0
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
networks:
|
networks:
|
||||||
ns-eatvio:
|
- ns-eatvio
|
||||||
ipv4_address: 172.118.0.6
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./typesense-data:/data
|
- ./typesense-data:/data
|
||||||
command: "--data-dir /data --api-key=typesense --enable-cors"
|
command: "--data-dir /data --api-key=typesense --enable-cors"
|
||||||
@@ -139,6 +144,3 @@ networks:
|
|||||||
external: true
|
external: true
|
||||||
ns-eatvio:
|
ns-eatvio:
|
||||||
external: false
|
external: false
|
||||||
ipam:
|
|
||||||
config:
|
|
||||||
- subnet: 172.118.0.0/28
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ upstream phpupstream {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name dev2.eatvio.com;
|
server_name shalom.eatvio.local;
|
||||||
|
|
||||||
client_max_body_size 108M;
|
client_max_body_size 108M;
|
||||||
|
|
||||||
@@ -40,11 +40,89 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 5000 ssl;
|
||||||
server_name socket.eatvio.com;
|
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 / {
|
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_read_timeout 60;
|
||||||
proxy_connect_timeout 60;
|
proxy_connect_timeout 60;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|||||||
Reference in New Issue
Block a user