first commit
This commit is contained in:
commit
f047b5e2f9
|
|
@ -0,0 +1,3 @@
|
||||||
|
env.ini
|
||||||
|
/app
|
||||||
|
/data
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Remote Attach",
|
||||||
|
"type": "python",
|
||||||
|
"request": "attach",
|
||||||
|
"connect": {
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 3000
|
||||||
|
},
|
||||||
|
"pathMappings": [
|
||||||
|
{
|
||||||
|
"localRoot": "${workspaceFolder}/python",
|
||||||
|
"remoteRoot": "/home/app"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"justMyCode": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Listen for XDebug",
|
||||||
|
"type": "php",
|
||||||
|
"request": "launch",
|
||||||
|
"port": 9000,
|
||||||
|
"pathMappings": {
|
||||||
|
"/var/www/html/": "${workspaceRoot}/app",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"intelephense.stubs": [
|
||||||
|
"${workspaceRoot}/phpstorm-stubs",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
version: '3.3'
|
||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/nginx
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
volumes:
|
||||||
|
- ../nginx/nginx_config_dev.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
- ../../app:/var/www/html
|
||||||
|
- ../scripts/nginx:/home/scripts
|
||||||
|
- ../../letsencrypt:/etc/letsencrypt
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 8090:8090
|
||||||
|
- 443:443
|
||||||
|
php:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/php
|
||||||
|
dockerfile: Dockerfile_ubuntu
|
||||||
|
volumes:
|
||||||
|
- ../../app:/var/www/html
|
||||||
|
- ../scripts/php:/home/scripts
|
||||||
|
ports:
|
||||||
|
- 9002:9002
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
workspace:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/php
|
||||||
|
dockerfile: Dockerfile_ubuntu
|
||||||
|
user: "${UID}"
|
||||||
|
volumes:
|
||||||
|
- ../../app:/var/www/html
|
||||||
|
- ../../shortcats:/var/www
|
||||||
|
- ../scripts/php:/home/scripts
|
||||||
|
command: sh /home/scripts/workspace.sh
|
||||||
|
db:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/mysql
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../../data/mysql:/var/lib/mysql
|
||||||
|
- ../../dumps:/home/dumps
|
||||||
|
- ../scripts/mysql:/home/scripts
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
restart: unless-stopped
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
mailcatcher:
|
||||||
|
# restart: on-failure
|
||||||
|
image: dockage/mailcatcher:0.9.0
|
||||||
|
ports:
|
||||||
|
- "1080:1080"
|
||||||
|
- "1025:1025"
|
||||||
|
adminer:
|
||||||
|
image: adminer
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
nodejs:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/nodejs
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../scripts/nodejs:/home/scripts
|
||||||
|
- ../../app:/home/app
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
external:
|
||||||
|
name: dockernet
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
version: '3.3'
|
||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/nginx
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
volumes:
|
||||||
|
- ../nginx/nginx_config_dev.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
- ../../app:/var/www/html
|
||||||
|
- ../../layouts:/var/www/layouts
|
||||||
|
- ../scripts/nginx:/home/scripts
|
||||||
|
- ../../letsencrypt:/etc/letsencrypt
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 8090:8090
|
||||||
|
- 443:443
|
||||||
|
php:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/php
|
||||||
|
dockerfile: Dockerfile_ubuntu
|
||||||
|
volumes:
|
||||||
|
- ../../app:/var/www/html
|
||||||
|
- ../scripts/php:/home/scripts
|
||||||
|
ports:
|
||||||
|
- 9002:9002
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
workspace:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/php
|
||||||
|
dockerfile: Dockerfile_ubuntu
|
||||||
|
user: "${UID}"
|
||||||
|
volumes:
|
||||||
|
- ../../app:/var/www/html
|
||||||
|
- ../../shortcats:/var/www
|
||||||
|
- ../scripts/php:/home/scripts
|
||||||
|
command: sh /home/scripts/workspace.sh
|
||||||
|
db:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/mysql
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../../data/mysql:/var/lib/mysql
|
||||||
|
- ../../dumps:/home/dumps
|
||||||
|
- ../scripts/mysql:/home/scripts
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
mailcatcher:
|
||||||
|
# restart: on-failure
|
||||||
|
image: dockage/mailcatcher:0.9.0
|
||||||
|
ports:
|
||||||
|
- "1080:1080"
|
||||||
|
- "1025:1025"
|
||||||
|
adminer:
|
||||||
|
image: adminer
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
nodejs:
|
||||||
|
build:
|
||||||
|
context: ../../dockerfiles/nodejs
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../scripts/nodejs:/home/scripts
|
||||||
|
- ../../app:/home/app
|
||||||
|
command: sh /home/scripts/start.sh
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM mypython
|
||||||
|
COPY ./scripts/* /home/
|
||||||
|
RUN sh /home/install.sh
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import nltk
|
||||||
|
from transformers import MarianMTModel, MarianTokenizer
|
||||||
|
|
||||||
|
nltk.download('wordnet')
|
||||||
|
nltk.download('punkt')
|
||||||
|
nltk.download('averaged_perceptron_tagger')
|
||||||
|
|
||||||
|
model_name = 'Helsinki-NLP/opus-mt-en-ru'
|
||||||
|
tokenizer = MarianTokenizer.from_pretrained(model_name)
|
||||||
|
model = MarianMTModel.from_pretrained(model_name)
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
apt install ffmpeg -y
|
||||||
|
pip install pydub
|
||||||
|
pip install nltk
|
||||||
|
pip install gTTS
|
||||||
|
apt install git -y
|
||||||
|
pip install transformers
|
||||||
|
pip install flask
|
||||||
|
apt install mariadb-client libmariadb3 libmariadb-dev python3-dev gcc -y
|
||||||
|
apt install pkg-config -y
|
||||||
|
pip install SentencePiece
|
||||||
|
pip install torch
|
||||||
|
pip install sacremoses
|
||||||
|
pip install git+https://github.com/clips/pattern.git
|
||||||
|
pip install debugpy
|
||||||
|
pip install beautifulsoup4
|
||||||
|
pip install requests
|
||||||
|
apt install libxml2-dev -y
|
||||||
|
apt install libxslt-dev -y
|
||||||
|
pip install lxml
|
||||||
|
pip install gunicorn
|
||||||
|
apt install supervisor -y
|
||||||
|
|
||||||
|
cd /home
|
||||||
|
python3 install.py
|
||||||
|
|
@ -0,0 +1,151 @@
|
||||||
|
server {
|
||||||
|
listen 8090;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_types text/plain text/css application/javascript;
|
||||||
|
client_max_body_size 1000M;
|
||||||
|
|
||||||
|
set $host_path "/var/www";
|
||||||
|
|
||||||
|
server_name localhost;
|
||||||
|
root $host_path/layouts;
|
||||||
|
set $bootstrap "index.html";
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
index index.html $bootstrap;
|
||||||
|
try_files $uri $uri/ /$bootstrap?$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
# отключаем обработку запросов к несуществующим статичным файлам
|
||||||
|
location ~ \.(js|css|png|jpg|jpeg|gif|swf|ico|pdf|mov|fla|zip|rar|svg)$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_types text/plain text/css application/javascript;
|
||||||
|
client_max_body_size 1000M;
|
||||||
|
|
||||||
|
set $host_path "/var/www";
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
root $host_path/html/public;
|
||||||
|
set $bootstrap "index.php";
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location ^~ /xml_files/ {
|
||||||
|
# Запрещаем выполнение любых PHP-файлов
|
||||||
|
location ~ \.php$ {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
# Разрешаем отдачу статики (изображений, CSS, JS и т. д.)
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/shop/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /front_img-handler.php?img=$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/vehicle-previews/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /dismantle_img-handler.php?img=362x266_$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/vehicle-original/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /dismantle_img-handler.php?img=1700x1250_$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/vehicle-big-previews/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /dismantle_img-handler.php?img=874x642_$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rewrite ^/img-prev/(.*)$ /img-handler.php?img=$1 last;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
index index.html $bootstrap;
|
||||||
|
try_files $uri $uri/ /$bootstrap?$args;
|
||||||
|
|
||||||
|
# auth_basic "Restricted Content";
|
||||||
|
# auth_basic_user_file /home/passwd/.htpasswd;
|
||||||
|
}
|
||||||
|
|
||||||
|
# location ^~/api {
|
||||||
|
# auth_basic off;
|
||||||
|
|
||||||
|
# index index.html $bootstrap;
|
||||||
|
# try_files $uri $uri/ /$bootstrap?$args;
|
||||||
|
# }
|
||||||
|
|
||||||
|
# отключаем обработку запросов к несуществующим статичным файлам
|
||||||
|
location ~ \.(js|css|png|jpg|jpeg|gif|swf|ico|pdf|mov|fla|zip|rar|svg)$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Кэширование изображений
|
||||||
|
location ~* \.(jpg|jpeg|png|gif|ico|webp)$ {
|
||||||
|
expires 30d;
|
||||||
|
add_header Cache-Control "public, max-age=2592000";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Кэширование скриптов
|
||||||
|
location ~* \.(js)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, max-age=604800";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Кэширование стилей
|
||||||
|
location ~* \.(css)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, max-age=604800";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Кэширование шрифтов
|
||||||
|
location ~* \.(woff|woff2|ttf|eot|otf)$ {
|
||||||
|
expires 30d;
|
||||||
|
add_header Cache-Control "public, max-age=2592000";
|
||||||
|
}
|
||||||
|
|
||||||
|
rewrite ^/img-prev/(.*)$ /img-handler.php?img=$1 last;
|
||||||
|
|
||||||
|
# передаем PHP-скрипт серверу FastCGI, прослушивающему адрес 127.0.0.1:9000
|
||||||
|
location ~ \.php {
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||||
|
|
||||||
|
# позволяем перехватывать запросы к несуществующим PHP-файлам
|
||||||
|
set $fsn /$bootstrap;
|
||||||
|
if (-f $document_root$fastcgi_script_name){
|
||||||
|
set $fsn $fastcgi_script_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
include /etc/nginx/fastcgi.conf;
|
||||||
|
#fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
|
||||||
|
#fastcgi_param QUERY_STRING $query_string;
|
||||||
|
|
||||||
|
# PATH_INFO и PATH_TRANSLATED могут быть опущены, но стандарт RFC 3875 определяет для CGI
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_TRANSLATED $document_root$fsn;
|
||||||
|
}
|
||||||
|
|
||||||
|
# не позволять nginx отдавать файлы, начинающиеся с точки (.htaccess, .svn, .git и прочие)
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
server {
|
||||||
|
listen 8080 ssl;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_types text/plain text/css application/javascript;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/new2.spavto96.ru/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/new2.spavto96.ru/privkey.pem;
|
||||||
|
ssl_trusted_certificate /etc/letsencrypt/live/new2.spavto96.ru/chain.pem;
|
||||||
|
|
||||||
|
server_name new2.spavto96.ru;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass http://adminer:8080;
|
||||||
|
|
||||||
|
auth_basic "Restricted Content";
|
||||||
|
auth_basic_user_file /home/passwd/.htpasswd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
|
||||||
|
server_name new2.spavto96.ru;
|
||||||
|
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
alias /var/www/letsencrypt/.well-known/acme-challenge/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ^~ /img/ {
|
||||||
|
alias /var/www/html/public/img/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 301 https://$server_name$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/new2.spavto96.ru/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/new2.spavto96.ru/privkey.pem;
|
||||||
|
ssl_trusted_certificate /etc/letsencrypt/live/new2.spavto96.ru/chain.pem;
|
||||||
|
|
||||||
|
server_name www.new2.spavto96.ru;
|
||||||
|
|
||||||
|
return 301 https://new2.spavto96.ru$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_types text/plain text/css application/javascript;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/new2.spavto96.ru/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/new2.spavto96.ru/privkey.pem;
|
||||||
|
ssl_trusted_certificate /etc/letsencrypt/live/new2.spavto96.ru/chain.pem;
|
||||||
|
|
||||||
|
client_max_body_size 32m;
|
||||||
|
|
||||||
|
fastcgi_read_timeout 1m;
|
||||||
|
proxy_read_timeout 1m;
|
||||||
|
|
||||||
|
set $host_path "/var/www";
|
||||||
|
|
||||||
|
server_name new2.spavto96.ru;
|
||||||
|
root $host_path/html/public;
|
||||||
|
set $bootstrap "index.php";
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
# rewrite ^/img/shop/(.*)$ /img-handler.php?img=$1 last;
|
||||||
|
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/letsencrypt/;
|
||||||
|
allow all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/shop/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /front_img-handler.php?img=$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/vehicle-previews/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /dismantle_img-handler.php?img=356x280_$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/vehicle-original/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /dismantle_img-handler.php?img=1700x750_$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/img/vehicle-big-previews/(.*)$ {
|
||||||
|
# Проверяем существование файла
|
||||||
|
try_files $uri /dismantle_img-handler.php?img=874x489_$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rewrite ^/img-prev/(.*)$ /img-handler.php?img=$1 last;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
index index.html $bootstrap;
|
||||||
|
try_files $uri $uri/ /$bootstrap?$args;
|
||||||
|
|
||||||
|
auth_basic "Restricted Content";
|
||||||
|
auth_basic_user_file /home/passwd/.htpasswd;
|
||||||
|
}
|
||||||
|
|
||||||
|
# отключаем обработку запросов к несуществующим статичным файлам
|
||||||
|
location ~ \.(js|css|png|jpg|jpeg|gif|swf|ico|pdf|mov|fla|zip|rar|svg)$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# передаем PHP-скрипт серверу FastCGI, прослушивающему адрес 127.0.0.1:9000
|
||||||
|
location ~ \.php {
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||||
|
|
||||||
|
# позволяем перехватывать запросы к несуществующим PHP-файлам
|
||||||
|
set $fsn /$bootstrap;
|
||||||
|
if (-f $document_root$fastcgi_script_name){
|
||||||
|
set $fsn $fastcgi_script_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
include /etc/nginx/fastcgi.conf;
|
||||||
|
#fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
|
||||||
|
#fastcgi_param QUERY_STRING $query_string;
|
||||||
|
|
||||||
|
# PATH_INFO и PATH_TRANSLATED могут быть опущены, но стандарт RFC 3875 определяет для CGI
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_TRANSLATED $document_root$fsn;
|
||||||
|
}
|
||||||
|
|
||||||
|
# не позволять nginx отдавать файлы, начинающиеся с точки (.htaccess, .svn, .git и прочие)
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"token_hmac_secret_key": "4b68e1f7-0f40-4cdc-b5af-d008e2a3e901",
|
||||||
|
"admin_password": "cd4dabc9-b81b-4085-a9aa-be06157d1cc0",
|
||||||
|
"admin_secret": "22c055bb-7c01-4fab-b3c3-d01acace2c18",
|
||||||
|
"api_key": "b77890d6-fb54-490a-aa94-acaf2c8ec556",
|
||||||
|
"allow_subscribe_for_client": true,
|
||||||
|
"allow_publish_for_subscriber": true,
|
||||||
|
"history_size": 500,
|
||||||
|
"history_ttl": "300s",
|
||||||
|
"allowed_origins": ["https://dev.h07.ru"],
|
||||||
|
"admin": true,
|
||||||
|
"tls": true,
|
||||||
|
"tls_key": "/etc/letsencrypt/privkey1.pem",
|
||||||
|
"tls_cert": "/etc/letsencrypt/fullchain1.pem",
|
||||||
|
"api_error_mode": "transport",
|
||||||
|
"debug": false,
|
||||||
|
"log_level": "debug",
|
||||||
|
"http_stream": true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"token_hmac_secret_key": "4b68e1f7-0f40-4cdc-b5af-d008e2a3e901",
|
||||||
|
"admin_password": "cd4dabc9-b81b-4085-a9aa-be06157d1cc0",
|
||||||
|
"admin_secret": "22c055bb-7c01-4fab-b3c3-d01acace2c18",
|
||||||
|
"api_key": "b77890d6-fb54-490a-aa94-acaf2c8ec556",
|
||||||
|
"allow_subscribe_for_client": true,
|
||||||
|
"allow_publish_for_subscriber": true,
|
||||||
|
"history_size": 500,
|
||||||
|
"history_ttl": "300s",
|
||||||
|
"allowed_origins": ["http://192.168.1.37"],
|
||||||
|
"admin": true,
|
||||||
|
"api_error_mode": "transport",
|
||||||
|
"debug": false,
|
||||||
|
"log_level": "debug",
|
||||||
|
"http_stream": true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"token_hmac_secret_key": "4b68e1f7-0f40-4cdc-b5af-d008e2a3e901",
|
||||||
|
"admin_password": "cd4dabc9-b81b-4085-a9aa-be06157d1cc0",
|
||||||
|
"admin_secret": "22c055bb-7c01-4fab-b3c3-d01acace2c18",
|
||||||
|
"api_key": "b77890d6-fb54-490a-aa94-acaf2c8ec556",
|
||||||
|
"allow_subscribe_for_client": true,
|
||||||
|
"allow_publish_for_subscriber": true,
|
||||||
|
"history_size": 500,
|
||||||
|
"history_ttl": "300s",
|
||||||
|
"allowed_origins": ["https://bot002.h07.ru"],
|
||||||
|
"admin": true,
|
||||||
|
"tls": true,
|
||||||
|
"tls_key": "/etc/letsencrypt/bot002.h07.ru/privkey4.pem",
|
||||||
|
"tls_cert": "/etc/letsencrypt/bot002.h07.ru/fullchain4.pem",
|
||||||
|
"api_error_mode": "transport",
|
||||||
|
"debug": false,
|
||||||
|
"log_level": "debug",
|
||||||
|
"http_stream": true
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"token_hmac_secret_key": "4b68e1f7-0f40-4cdc-b5af-d008e2a3e901",
|
||||||
|
"admin_password": "cd4dabc9-b81b-4085-a9aa-be06157d1cc0",
|
||||||
|
"admin_secret": "22c055bb-7c01-4fab-b3c3-d01acace2c18",
|
||||||
|
"api_key": "b77890d6-fb54-490a-aa94-acaf2c8ec556",
|
||||||
|
"allow_subscribe_for_client": true,
|
||||||
|
"allow_publish_for_subscriber": true,
|
||||||
|
"history_size": 500,
|
||||||
|
"history_ttl": "300s",
|
||||||
|
"allowed_origins": ["https://gameconstr.h07.ru"],
|
||||||
|
"admin": true,
|
||||||
|
"tls": true,
|
||||||
|
"tls_key": "/etc/letsencrypt/gameconstr.h07.ru/privkey4.pem",
|
||||||
|
"tls_cert": "/etc/letsencrypt/gameconstr.h07.ru/fullchain4.pem",
|
||||||
|
"api_error_mode": "transport",
|
||||||
|
"debug": false,
|
||||||
|
"log_level": "debug",
|
||||||
|
"http_stream": true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# /usr/bin/supervisord -c /home/scripts/supervisord.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord_dev.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord_prod.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord_test.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/home/centrifugo --config=/home/scripts/conf.json
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/home/centrifugo --config=/home/scripts/conf_dev.json
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/home/centrifugo --config=/home/scripts/conf_prod.json
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/home/centrifugo --config=/home/scripts/conf_test.json
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,31 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFWjCCA0KgAwIBAgIVAMxPrH65dOLwOyTFQ5b37jJ3JnlzMA0GCSqGSIb3DQEB
|
||||||
|
CwUAMDwxOjA4BgNVBAMTMUVsYXN0aWNzZWFyY2ggc2VjdXJpdHkgYXV0by1jb25m
|
||||||
|
aWd1cmF0aW9uIEhUVFAgQ0EwHhcNMjMwMTMwMTk1NjExWhcNMjYwMTI5MTk1NjEx
|
||||||
|
WjA8MTowOAYDVQQDEzFFbGFzdGljc2VhcmNoIHNlY3VyaXR5IGF1dG8tY29uZmln
|
||||||
|
dXJhdGlvbiBIVFRQIENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
|
||||||
|
x96CDlxu1NR6bhskOT5yUNVFYCbd97bV+rXvV2wMZALPt+zOS8n0fDmatjbp0uVz
|
||||||
|
uUEfjJUQ/WMY4afUt9wVK+3GFHKMvigYoZ8X2A3HYRTJEpQ9PxhC9dOu8l+ZDZOR
|
||||||
|
2GB1JQ5GP/nqNKif+2XFqsYSt5DlbWDtOYzPiSmcdnilQKCBc1RoEt4S7ujk9qrL
|
||||||
|
YkpCnlrP28N2KiseFuMKlTmcBvkwvXEJuYTlFeKp9iSG5UbMSiiZet/lBlHCiKqr
|
||||||
|
BGsSePcz9XnTzkrEKHDHwD7LR9D1aX/vvuqJhrgA6vPDVmh0IZmSsrHOUEzMqxjs
|
||||||
|
vrPjeNb7YeiR2wvuC7I+1pPn9+p0pxeiT26+p2p3qHdpZLduL1xi+1fbnA50Nbtp
|
||||||
|
46IvzEXT+wAAglDjGdj15HZ4H/6ZRs7mP1O9XF9B+akFh+WkV/wnFm4Jf9KPuSOl
|
||||||
|
tH0T8J0e7XyZIvDvMCvEjuuoLDvhfeJW6WVz5gLjzgVMgAffu562O7kkyEaAdy9E
|
||||||
|
iX8yu6Hto4FIimMTG9+gSYhRqqtlc8Mrn2dUVk1/M0e6tNXP8NYgmrMMT2TzEwWs
|
||||||
|
+4DSkamoc8MlBowA1HM7ynIkwuXY1anv4T+1KQuiiSUxY5wUKw5mzr4FmFk/Nl3H
|
||||||
|
vhBI/suHV8UoxV9FBhNHCgNbBEA98koK/ndjqwyj0IUCAwEAAaNTMFEwHQYDVR0O
|
||||||
|
BBYEFOo5fX4JZcR2GMaJ7C9XnjMJ08OJMB8GA1UdIwQYMBaAFOo5fX4JZcR2GMaJ
|
||||||
|
7C9XnjMJ08OJMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAGEl
|
||||||
|
qaMhLE4ILD9UH76JbU5SEeqhKE+/OyAOm7NNWpB2/0hKf68bec8auvGHMhcA4/kU
|
||||||
|
Rp+hlb82JhKBJKeF3p8ZQskamseM3OTSvT39kCFGembSPkN9jCJBDZYjfTaVY7Cj
|
||||||
|
Gn4Y4YOofCqW8zO5Tha3lKuSkqrurd2O8TCEVRuyPVy290tHOEZw2CRIE4CoJ0VX
|
||||||
|
miPOwgTPyU8oernzcPks3c2SJUJdH8lmnxQnL2tu4leZAvmOR3FuhPGEkZd0hgjs
|
||||||
|
jjHVbXRXqTzNSJ3MouvAr7S68m7IpURvu44tmTnB/QUZEb+KMDAYUtHY55moRQJ8
|
||||||
|
q4HdFhRtFsdVDmjUn/sCMAea5Cj8ZLNetNSlIUhKvekwKEHWHaN+9Isipx+P6m89
|
||||||
|
KPQeyuhdNUklizJuUu4wVvqolumxIku5JUzHaLKxqLrY6AK/ptRPxGKnUecsnSbw
|
||||||
|
vublNy9vNQwbg29LP19uw8E5bKiFyO04o40kNsqmYzroB5NGAAYMfBBzboMghF6R
|
||||||
|
LcuZBX5TQGvWChqrSrv7h19bcUuUgRlPfos3K21N8/i5AsWWrNX7Xa7Ot4xKLp1X
|
||||||
|
wJmIjKfqRHQ34GqvaI7/+RMGxY/8jaR1mY3FPMa6BaQikgaf9Ns4cjZFoxhTgDM7
|
||||||
|
tK+hc/6zCqZRY5HbXkZEdGrdRa6k5ajLyesRB27x
|
||||||
|
-----END CERTIFICATE-----
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,33 @@
|
||||||
|
discovery.type: single-node
|
||||||
|
cluster.routing.allocation.disk.threshold_enabled: false
|
||||||
|
network.host: 0.0.0.0
|
||||||
|
# node.ml: false
|
||||||
|
xpack.ml.enabled: false
|
||||||
|
path:
|
||||||
|
data: /home/scripts/data
|
||||||
|
logs: /home/scripts/log
|
||||||
|
|
||||||
|
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
|
||||||
|
#
|
||||||
|
# The following settings, TLS certificates, and keys have been automatically
|
||||||
|
# generated to configure Elasticsearch security features on 30-01-2023 19:56:07
|
||||||
|
#
|
||||||
|
# --------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Enable security features
|
||||||
|
xpack.security.enabled: false
|
||||||
|
|
||||||
|
xpack.security.enrollment.enabled: false
|
||||||
|
|
||||||
|
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
|
||||||
|
xpack.security.http.ssl:
|
||||||
|
enabled: false
|
||||||
|
keystore.path: certs/http.p12
|
||||||
|
|
||||||
|
# Enable encryption and mutual authentication between cluster nodes
|
||||||
|
xpack.security.transport.ssl:
|
||||||
|
enabled: false
|
||||||
|
verification_mode: certificate
|
||||||
|
keystore.path: certs/transport.p12
|
||||||
|
truststore.path: certs/transport.p12
|
||||||
|
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
-Xms2G
|
||||||
|
-Xmx2G
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Set to debug or trace if log4j initialization is failing
|
||||||
|
status = warn
|
||||||
|
|
||||||
|
# Name of the configuration
|
||||||
|
name = ConsoleLogConfigDemo
|
||||||
|
|
||||||
|
# Console appender configuration
|
||||||
|
appender.console.type = Console
|
||||||
|
appender.console.name = consoleLogger
|
||||||
|
appender.console.layout.type = PatternLayout
|
||||||
|
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
||||||
|
|
||||||
|
# Root logger level
|
||||||
|
rootLogger.level = debug
|
||||||
|
|
||||||
|
# Root logger referring to console appender
|
||||||
|
rootLogger.appenderRef.stdout.ref = consoleLogger
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# chown -R elasticsearch /home/elasticsearch-8.6.1
|
||||||
|
# /usr/bin/supervisord -c /home/supervisord.conf
|
||||||
|
# tail -f /dev/null
|
||||||
|
sleep 3
|
||||||
|
ES_PATH_CONF=/home/scripts /usr/share/elasticsearch/bin/elasticsearch
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:elasticsearch]
|
||||||
|
command="ES_PATH_CONF=/home/scripts /usr/share/elasticsearch/bin/elasticsearch"
|
||||||
|
user=elasticsearch
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# tail -f /dev/null
|
||||||
|
cd /home/ftp
|
||||||
|
python3 ftpServer.py
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ $(ls /var/lib/mysql | wc -l) -eq 0 ]; then
|
||||||
|
DB_DATA_PATH="/var/lib/mysql"
|
||||||
|
DB_ROOT_PASS="password"
|
||||||
|
DB_USER="user"
|
||||||
|
DB_PASS="password"
|
||||||
|
DB_NAME="dbname"
|
||||||
|
|
||||||
|
# 1. Инициализация с созданием системных таблиц
|
||||||
|
mysqld --user=mysql --datadir=${DB_DATA_PATH} --initialize-insecure \
|
||||||
|
--character-set-server=utf8mb4 \
|
||||||
|
--collation-server=utf8mb4_unicode_ci
|
||||||
|
|
||||||
|
# 2. Временный запуск для настройки
|
||||||
|
mysqld --user=mysql --datadir=${DB_DATA_PATH} --skip-grant-tables &
|
||||||
|
sleep 15
|
||||||
|
|
||||||
|
# 3. Настройка root пароля и базовых привилегий
|
||||||
|
mysql -u root -e "FLUSH PRIVILEGES;"
|
||||||
|
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASS}';"
|
||||||
|
mysql -u root -p"${DB_ROOT_PASS}" -e "CREATE DATABASE ${DB_NAME};"
|
||||||
|
mysql -u root -p"${DB_ROOT_PASS}" -e "CREATE USER '${DB_USER}'@'%' IDENTIFIED BY '${DB_PASS}';"
|
||||||
|
mysql -u root -p"${DB_ROOT_PASS}" -e "GRANT ALL ON ${DB_NAME}.* TO '${DB_USER}'@'%';"
|
||||||
|
mysql -u root -p"${DB_ROOT_PASS}" -e "FLUSH PRIVILEGES;"
|
||||||
|
|
||||||
|
# 4. Остановка временного сервера
|
||||||
|
mysqladmin -u root -p"${DB_ROOT_PASS}" shutdown
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
# 5. Нормальный запуск
|
||||||
|
# mysqld --user=mysql --datadir=${DB_DATA_PATH} &
|
||||||
|
# sleep 5
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Установка прав
|
||||||
|
chown -R mysql:mysql /var/lib/mysql
|
||||||
|
|
||||||
|
# Запускаем MySQL и висим в foreground
|
||||||
|
exec mysqld \
|
||||||
|
--user=mysql \
|
||||||
|
--datadir=/var/lib/mysql \
|
||||||
|
--pid-file=/var/run/mysqld/mysqld.pid \
|
||||||
|
--socket=/var/run/mysqld/mysqld.sock \
|
||||||
|
--console
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:mysql]
|
||||||
|
command=/usr/sbin/mysqld --defaults-file=/etc/mysql/mysql.conf.d/mysqld.cnf --datadir=/var/lib/mysql --user=mysql --innodb_fast_shutdown=2 --skip-name-resolve
|
||||||
|
startretries = 10
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
domain=$1
|
||||||
|
|
||||||
|
certbot certonly --config /etc/certbot/conf.ini -d ${domain}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
user=$1
|
||||||
|
|
||||||
|
echo ${user}
|
||||||
|
echo -n ${user}':' >> /home/passwd/.htpasswd
|
||||||
|
openssl passwd -apr1 >> /home/passwd/.htpasswd
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:nginx]
|
||||||
|
command=/usr/sbin/nginx -g 'daemon off;'
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=db
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=dbname
|
||||||
|
DB_USERNAME=user
|
||||||
|
DB_PASSWORD=password
|
||||||
|
|
||||||
|
OLD_DB_CONNECTION=old
|
||||||
|
OLD_DB_HOST=db
|
||||||
|
OLD_DB_PORT=3306
|
||||||
|
OLD_DB_DATABASE=old
|
||||||
|
OLD_DB_USERNAME=mariadb_user
|
||||||
|
OLD_DB_PASSWORD=mariadb_user_password
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=database
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=database
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
SESSION_CONNECTION=mysql
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_DRIVER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
|
PUSHER_APP_ID=
|
||||||
|
PUSHER_APP_KEY=
|
||||||
|
PUSHER_APP_SECRET=
|
||||||
|
PUSHER_APP_CLUSTER=mt1
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=false
|
||||||
|
APP_URL=http://example.com
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=db
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=dbname
|
||||||
|
DB_USERNAME=mariadb_user
|
||||||
|
DB_PASSWORD=mariadb_user_password
|
||||||
|
|
||||||
|
OLD_DB_CONNECTION=old
|
||||||
|
OLD_DB_HOST=db
|
||||||
|
OLD_DB_PORT=3306
|
||||||
|
OLD_DB_DATABASE=old
|
||||||
|
OLD_DB_USERNAME=mariadb_user
|
||||||
|
OLD_DB_PASSWORD=mariadb_user_password
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=database
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=database
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
SESSION_CONNECTION=mysql
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_DRIVER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
|
PUSHER_APP_ID=
|
||||||
|
PUSHER_APP_KEY=
|
||||||
|
PUSHER_APP_SECRET=
|
||||||
|
PUSHER_APP_CLUSTER=mt1
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cp /home/scripts/.env_dev /var/www/html/.env
|
||||||
|
cd /var/www/html
|
||||||
|
composer install
|
||||||
|
chmod -R 777 storage
|
||||||
|
php8 artisan key:generate
|
||||||
|
php8 artisan session:table
|
||||||
|
php8 artisan migrate
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cp /home/scripts/.env_prod /var/www/html/.env
|
||||||
|
cd /var/www/html
|
||||||
|
composer install
|
||||||
|
chmod -R 777 storage
|
||||||
|
php artisan key:generate
|
||||||
|
php artisan session:table
|
||||||
|
php artisan migrate
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# sleep 10
|
||||||
|
supervisord -c /home/scripts/supervisord.conf
|
||||||
|
# /usr/sbin/php-fpm8.1
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord_php7.conf
|
||||||
|
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/var/run/supervisor.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[inet_http_server]
|
||||||
|
port=0.0.0.0:9002
|
||||||
|
username=user ; Сам я не указываю username/password,
|
||||||
|
password=password ; так как использую "auth_basic" для всего хоста в Nginx
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/usr/sbin/php-fpm8.3 --nodaemonize
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
[bot:updater]
|
||||||
|
command=php /var/www/html/artisan start-telegram-updater
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
[bot:sender]
|
||||||
|
command=php /var/www/html/artisan start-telegram-sender
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd /home/app/flask
|
||||||
|
gunicorn -b 0.0.0.0:80 app:app
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:srv]
|
||||||
|
command=sh /home/scripts/gunicorn.sh
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/usr/bin/redis-server --protected-mode no
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
docker build -f ./dockerfiles/python/Dockerfile -t mypython ./dockerfiles/python
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM alpine:3.15
|
||||||
|
COPY ./scripts/* /home/
|
||||||
|
RUN apk add curl supervisor && cd /home && /home/install.sh
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"token_hmac_secret_key": "4b68e1f7-0f40-4cdc-b5af-d008e2a3e901",
|
||||||
|
"admin_password": "cd4dabc9-b81b-4085-a9aa-be06157d1cc0",
|
||||||
|
"admin_secret": "22c055bb-7c01-4fab-b3c3-d01acace2c18",
|
||||||
|
"api_key": "b77890d6-fb54-490a-aa94-acaf2c8ec556",
|
||||||
|
"allow_subscribe_for_client": true,
|
||||||
|
"allow_publish_for_subscriber": true,
|
||||||
|
"history_size": 500,
|
||||||
|
"history_ttl": "300s",
|
||||||
|
"allowed_origins": ["http://localhost"],
|
||||||
|
"admin": true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/supervisord -c /home/scripts/supervisord.conf
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
[unix_http_server]
|
||||||
|
file=/run/supervisord.sock
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile = /tmp/supervisord.log
|
||||||
|
logfile_maxbytes = 50MB
|
||||||
|
logfile_backups=10
|
||||||
|
loglevel = info
|
||||||
|
pidfile = /tmp/supervisord.pid
|
||||||
|
nodaemon = false
|
||||||
|
minfds = 1024
|
||||||
|
minprocs = 200
|
||||||
|
umask = 022
|
||||||
|
user = root
|
||||||
|
identifier = supervisor
|
||||||
|
directory = /tmp
|
||||||
|
nocleanup = true
|
||||||
|
childlogdir = /tmp
|
||||||
|
strip_ansi = false
|
||||||
|
|
||||||
|
[program:php]
|
||||||
|
command=/home/centrifugo --config=/home/scripts/conf.json
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -n "${DEBUG}" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
_centrifugo_latest() {
|
||||||
|
curl -s https://api.github.com/repos/centrifugal/centrifugo/releases/latest | grep "tag_name" | awk '{print $2}' | sed 's/[",]//g'
|
||||||
|
}
|
||||||
|
|
||||||
|
_detect_binary() {
|
||||||
|
os="$(uname)"
|
||||||
|
case "$os" in
|
||||||
|
Linux|Darwin) echo "centrifugo" ;;
|
||||||
|
*) echo "Unsupported operating system: $os" 1>&2; return 1 ;;
|
||||||
|
esac
|
||||||
|
unset os
|
||||||
|
}
|
||||||
|
|
||||||
|
_detect_os() {
|
||||||
|
os="$(uname)"
|
||||||
|
case "$os" in
|
||||||
|
Linux) echo "linux" ;;
|
||||||
|
Darwin) echo "darwin" ;;
|
||||||
|
*) echo "Unsupported operating system: $os" 1>&2; return 1 ;;
|
||||||
|
esac
|
||||||
|
unset os
|
||||||
|
}
|
||||||
|
|
||||||
|
_detect_arch() {
|
||||||
|
arch="$(uname -m)"
|
||||||
|
case "$arch" in
|
||||||
|
amd64|x86_64) echo "amd64" ;;
|
||||||
|
arm64|aarch64) echo "arm64" ;;
|
||||||
|
*) echo "Unsupported processor architecture: $arch" 1>&2; return 1 ;;
|
||||||
|
esac
|
||||||
|
unset arch
|
||||||
|
}
|
||||||
|
|
||||||
|
_download_url() {
|
||||||
|
echo "https://github.com/centrifugal/centrifugo/releases/download/$CENTRIFUGO_VERSION/${centrifugoBinary}_${CENTRIFUGO_VERSION#"v"}_${centrifugoOs}_${centrifugoArch}.tar.gz"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [ -z "${CENTRIFUGO_VERSION}" ]; then
|
||||||
|
CENTRIFUGO_VERSION=$(_centrifugo_latest)
|
||||||
|
fi
|
||||||
|
|
||||||
|
centrifugoInstallPath=`pwd`
|
||||||
|
centrifugoBinary="$(_detect_binary)"
|
||||||
|
centrifugoOs="$(_detect_os)"
|
||||||
|
centrifugoArch="$(_detect_arch)"
|
||||||
|
centrifugoDownloadUrl="$(_download_url)"
|
||||||
|
|
||||||
|
mkdir -p -- "$centrifugoInstallPath"
|
||||||
|
|
||||||
|
echo "Downloading centrifugo from URL: $centrifugoDownloadUrl"
|
||||||
|
|
||||||
|
tmpdir=$(mktemp -d)
|
||||||
|
curl -sSLf "$centrifugoDownloadUrl" >"$tmpdir/centrifugo.tar.gz"
|
||||||
|
tar -xzf $tmpdir/centrifugo.tar.gz ${centrifugoBinary}
|
||||||
|
chmod +x "$centrifugoBinary"
|
||||||
|
rm -r $tmpdir
|
||||||
|
|
||||||
|
echo "centrifugo is now executable in $centrifugoInstallPath"
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM ubuntu:22.10
|
||||||
|
COPY ./scripts/* /home/
|
||||||
|
RUN sh /home/install.sh
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd /home
|
||||||
|
sudo clickhouse start
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sed -i -r 's/([a-z]{2}.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
|
||||||
|
sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
|
||||||
|
apt update
|
||||||
|
apt install sudo curl
|
||||||
|
cd /home
|
||||||
|
curl -O 'https://builds.clickhouse.com/master/amd64/clickhouse' && chmod a+x clickhouse
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive ./clickhouse install
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
FROM elasticsearch:8.6.0
|
||||||
|
COPY ./scripts/* /home/
|
||||||
|
RUN sh /home/install.sh
|
||||||
|
ENV JAVA_HOME=/usr
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,31 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFWjCCA0KgAwIBAgIVAMxPrH65dOLwOyTFQ5b37jJ3JnlzMA0GCSqGSIb3DQEB
|
||||||
|
CwUAMDwxOjA4BgNVBAMTMUVsYXN0aWNzZWFyY2ggc2VjdXJpdHkgYXV0by1jb25m
|
||||||
|
aWd1cmF0aW9uIEhUVFAgQ0EwHhcNMjMwMTMwMTk1NjExWhcNMjYwMTI5MTk1NjEx
|
||||||
|
WjA8MTowOAYDVQQDEzFFbGFzdGljc2VhcmNoIHNlY3VyaXR5IGF1dG8tY29uZmln
|
||||||
|
dXJhdGlvbiBIVFRQIENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
|
||||||
|
x96CDlxu1NR6bhskOT5yUNVFYCbd97bV+rXvV2wMZALPt+zOS8n0fDmatjbp0uVz
|
||||||
|
uUEfjJUQ/WMY4afUt9wVK+3GFHKMvigYoZ8X2A3HYRTJEpQ9PxhC9dOu8l+ZDZOR
|
||||||
|
2GB1JQ5GP/nqNKif+2XFqsYSt5DlbWDtOYzPiSmcdnilQKCBc1RoEt4S7ujk9qrL
|
||||||
|
YkpCnlrP28N2KiseFuMKlTmcBvkwvXEJuYTlFeKp9iSG5UbMSiiZet/lBlHCiKqr
|
||||||
|
BGsSePcz9XnTzkrEKHDHwD7LR9D1aX/vvuqJhrgA6vPDVmh0IZmSsrHOUEzMqxjs
|
||||||
|
vrPjeNb7YeiR2wvuC7I+1pPn9+p0pxeiT26+p2p3qHdpZLduL1xi+1fbnA50Nbtp
|
||||||
|
46IvzEXT+wAAglDjGdj15HZ4H/6ZRs7mP1O9XF9B+akFh+WkV/wnFm4Jf9KPuSOl
|
||||||
|
tH0T8J0e7XyZIvDvMCvEjuuoLDvhfeJW6WVz5gLjzgVMgAffu562O7kkyEaAdy9E
|
||||||
|
iX8yu6Hto4FIimMTG9+gSYhRqqtlc8Mrn2dUVk1/M0e6tNXP8NYgmrMMT2TzEwWs
|
||||||
|
+4DSkamoc8MlBowA1HM7ynIkwuXY1anv4T+1KQuiiSUxY5wUKw5mzr4FmFk/Nl3H
|
||||||
|
vhBI/suHV8UoxV9FBhNHCgNbBEA98koK/ndjqwyj0IUCAwEAAaNTMFEwHQYDVR0O
|
||||||
|
BBYEFOo5fX4JZcR2GMaJ7C9XnjMJ08OJMB8GA1UdIwQYMBaAFOo5fX4JZcR2GMaJ
|
||||||
|
7C9XnjMJ08OJMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAGEl
|
||||||
|
qaMhLE4ILD9UH76JbU5SEeqhKE+/OyAOm7NNWpB2/0hKf68bec8auvGHMhcA4/kU
|
||||||
|
Rp+hlb82JhKBJKeF3p8ZQskamseM3OTSvT39kCFGembSPkN9jCJBDZYjfTaVY7Cj
|
||||||
|
Gn4Y4YOofCqW8zO5Tha3lKuSkqrurd2O8TCEVRuyPVy290tHOEZw2CRIE4CoJ0VX
|
||||||
|
miPOwgTPyU8oernzcPks3c2SJUJdH8lmnxQnL2tu4leZAvmOR3FuhPGEkZd0hgjs
|
||||||
|
jjHVbXRXqTzNSJ3MouvAr7S68m7IpURvu44tmTnB/QUZEb+KMDAYUtHY55moRQJ8
|
||||||
|
q4HdFhRtFsdVDmjUn/sCMAea5Cj8ZLNetNSlIUhKvekwKEHWHaN+9Isipx+P6m89
|
||||||
|
KPQeyuhdNUklizJuUu4wVvqolumxIku5JUzHaLKxqLrY6AK/ptRPxGKnUecsnSbw
|
||||||
|
vublNy9vNQwbg29LP19uw8E5bKiFyO04o40kNsqmYzroB5NGAAYMfBBzboMghF6R
|
||||||
|
LcuZBX5TQGvWChqrSrv7h19bcUuUgRlPfos3K21N8/i5AsWWrNX7Xa7Ot4xKLp1X
|
||||||
|
wJmIjKfqRHQ34GqvaI7/+RMGxY/8jaR1mY3FPMa6BaQikgaf9Ns4cjZFoxhTgDM7
|
||||||
|
tK+hc/6zCqZRY5HbXkZEdGrdRa6k5ajLyesRB27x
|
||||||
|
-----END CERTIFICATE-----
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue