Переработка файлов docker-compose (временная версия)
parent
1b3e5403ca
commit
42961f8e1c
|
@ -1 +0,0 @@
|
|||
./node_modules/
|
62
.travis.yml
62
.travis.yml
|
@ -1,62 +0,0 @@
|
|||
language: generic
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- .vagga/.cache
|
||||
|
||||
install:
|
||||
- "echo ubuntu-mirror: http://us.archive.ubuntu.com/ubuntu/ > ~/.vagga.yaml"
|
||||
- "echo alpine-mirror: http://mirrors.gigenet.com/alpinelinux/ >> ~/.vagga.yaml"
|
||||
- "echo travis:100000:65536 | sudo tee /etc/subuid | sudo tee /etc/subgid"
|
||||
- sudo apt-get install uidmap -y
|
||||
- curl http://files.zerogw.com/vagga/vagga-install-testing.sh | sh
|
||||
|
||||
before_deploy:
|
||||
- ssh-keyscan -p $deploy_port -H $deploy_host 2>&1 | tee -a $HOME/.ssh/known_hosts
|
||||
- openssl aes-256-cbc -K $encrypted_6a519e1377ad_key -iv $encrypted_6a519e1377ad_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d
|
||||
- eval "$(ssh-agent -s)"
|
||||
- chmod 600 /tmp/deploy_rsa
|
||||
- ssh-add /tmp/deploy_rsa
|
||||
|
||||
script:
|
||||
- vagga _build redis-trunk
|
||||
- vagga _build celery-trunk
|
||||
- vagga _build php-trunk
|
||||
- vagga _build mysql-trunk
|
||||
- vagga _build elastic-trunk
|
||||
# FIXME: - vagga _build logs-trunk
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: >-
|
||||
./deploy/script.sh
|
||||
--project tabun
|
||||
--type trunk
|
||||
--blobs "static"
|
||||
--containers "redis celery php mysql elastic"
|
||||
--destination $deploy_destination
|
||||
--server $deploy_host
|
||||
--port $deploy_port
|
||||
--user $deploy_user
|
||||
on:
|
||||
branch: development
|
||||
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: >-
|
||||
./deploy/script.sh
|
||||
--project tabun
|
||||
--type production
|
||||
--blobs "static"
|
||||
--containers "redis celery php mysql elastic"
|
||||
--destination $deploy_destination
|
||||
--server $deploy_host
|
||||
--port $deploy_port
|
||||
--user $deploy_user
|
||||
on:
|
||||
tags: true
|
||||
branch: master
|
||||
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+.[0-9]+(-[a-z]+([0-9]+)?)?$
|
12
Makefile
12
Makefile
|
@ -1,12 +0,0 @@
|
|||
run: backend-version composer-install compile-locales
|
||||
docker-compose up
|
||||
|
||||
composer-install:
|
||||
docker-compose run --rm php-fpm composer install --no-interaction --optimize-autoloader
|
||||
|
||||
backend-version:
|
||||
@git describe --always > ./backend.version
|
||||
|
||||
compile-locales:
|
||||
docker-compose run --rm frontend sh ./docker/compile_locales.sh
|
||||
docker-compose restart php-fpm || true # ignore error if php-fpm container is not started
|
|
@ -1,725 +0,0 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "001564d6612d7b4809932594766d6abb",
|
||||
"packages": [
|
||||
{
|
||||
"name": "agelxnash/jevix",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/AgelxNash/Jevix.git",
|
||||
"reference": "d796d7ca5ac6f35c461c33c3caad29b608907304"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/AgelxNash/Jevix/zipball/d796d7ca5ac6f35c461c33c3caad29b608907304",
|
||||
"reference": "d796d7ca5ac6f35c461c33c3caad29b608907304",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
],
|
||||
"psr-0": {
|
||||
"Jevix": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roman Shamritskiy",
|
||||
"email": "roman@litgroup.ru"
|
||||
},
|
||||
{
|
||||
"name": "ur001"
|
||||
},
|
||||
{
|
||||
"name": "livestreet framework"
|
||||
},
|
||||
{
|
||||
"name": "Bezumkin"
|
||||
},
|
||||
{
|
||||
"name": "Evgeniy Borisov",
|
||||
"email": "agel-nash@mail.ru"
|
||||
}
|
||||
],
|
||||
"description": "Library for html filtering",
|
||||
"time": "2018-12-10T12:56:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "elasticsearch/elasticsearch",
|
||||
"version": "v6.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/elastic/elasticsearch-php.git",
|
||||
"reference": "b8e3bc9d1fc54d6a18692df0b74956efe7fe241a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/b8e3bc9d1fc54d6a18692df0b74956efe7fe241a",
|
||||
"reference": "b8e3bc9d1fc54d6a18692df0b74956efe7fe241a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": ">=1.3.7",
|
||||
"guzzlehttp/ringphp": "~1.0",
|
||||
"php": "^7.0",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"cpliakas/git-wrapper": "~1.0",
|
||||
"doctrine/inflector": "^1.1",
|
||||
"mockery/mockery": "0.9.4",
|
||||
"phpstan/phpstan-shim": "0.8.3",
|
||||
"phpunit/phpunit": "6.3.0",
|
||||
"squizlabs/php_codesniffer": "3.0.2",
|
||||
"symfony/finder": "^2.8",
|
||||
"symfony/yaml": "^2.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "*",
|
||||
"monolog/monolog": "Allows for client-level logging and tracing"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Elasticsearch\\": "src/Elasticsearch/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Zachary Tong"
|
||||
}
|
||||
],
|
||||
"description": "PHP Client for Elasticsearch",
|
||||
"keywords": [
|
||||
"client",
|
||||
"elasticsearch",
|
||||
"search"
|
||||
],
|
||||
"time": "2017-12-05T14:15:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "everypony/zend-cache-redis",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/everypony/zend-cache-redis.git",
|
||||
"reference": "c1c0ba0f0156c00cb2c57b5275ce154ff4f4cf91"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/everypony/zend-cache-redis/zipball/c1c0ba0f0156c00cb2c57b5275ce154ff4f4cf91",
|
||||
"reference": "c1c0ba0f0156c00cb2c57b5275ce154ff4f4cf91",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"zf1/zend-cache": "^1.12.11"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"."
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "kalaspuff",
|
||||
"email": "carloscar@agigen.se",
|
||||
"homepage": "https://github.com/kalaspuff/",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "orhideous",
|
||||
"email": "me@orhideous.name",
|
||||
"homepage": "https://orhideous.name/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Redis cache backend for Zend Framework",
|
||||
"homepage": "https://github.com/everypony/zend-cache-redis",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"redis",
|
||||
"zend"
|
||||
],
|
||||
"time": "2018-12-12T18:58:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/ringphp",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/RingPHP.git",
|
||||
"reference": "5e2a174052995663dd68e6b5ad838afd47dd615b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b",
|
||||
"reference": "5e2a174052995663dd68e6b5ad838afd47dd615b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/streams": "~3.0",
|
||||
"php": ">=5.4.0",
|
||||
"react/promise": "~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "Guzzle will use specific adapters if cURL is present"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Ring\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
|
||||
"abandoned": true,
|
||||
"time": "2018-07-31T13:22:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/streams",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/streams.git",
|
||||
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
|
||||
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Stream\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Provides a simple abstraction over streams of data",
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"keywords": [
|
||||
"Guzzle",
|
||||
"stream"
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2014-10-12T19:18:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "massivescale/celery-php",
|
||||
"version": "2.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gjedeer/celery-php.git",
|
||||
"reference": "4725dffec3ba03835191ea9d05bbd2777d4bc46f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/gjedeer/celery-php/zipball/4725dffec3ba03835191ea9d05bbd2777d4bc46f",
|
||||
"reference": "4725dffec3ba03835191ea9d05bbd2777d4bc46f",
|
||||
"shasum": ""
|
||||
},
|
||||
"suggest": {
|
||||
"predis/predis": "Adds support for the predis, PHP client library for Redis, backend",
|
||||
"videlalvaro/php-amqplib": "Adds support for the php-amqplib, AMQP library for PHP, backend"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"celery.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-2-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "GDR!",
|
||||
"email": "info@massivescale.net",
|
||||
"homepage": "http://massivescale.net/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP client for Celery task queue",
|
||||
"homepage": "https://github.com/gjedeer/celery-php/",
|
||||
"keywords": [
|
||||
"AMQP",
|
||||
"celery",
|
||||
"cron",
|
||||
"python",
|
||||
"queue",
|
||||
"redis",
|
||||
"task"
|
||||
],
|
||||
"time": "2016-10-16T07:17:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "predis/predis",
|
||||
"version": "v1.1.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/predis/predis.git",
|
||||
"reference": "c50c3393bb9f47fa012d0cdfb727a266b0818259"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/predis/predis/zipball/c50c3393bb9f47fa012d0cdfb727a266b0818259",
|
||||
"reference": "c50c3393bb9f47fa012d0cdfb727a266b0818259",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "Allows access to Webdis when paired with phpiredis",
|
||||
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Predis\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Daniele Alessandri",
|
||||
"email": "suppakilla@gmail.com",
|
||||
"homepage": "http://clorophilla.net",
|
||||
"role": "Creator & Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Till Krüss",
|
||||
"homepage": "https://till.im",
|
||||
"role": "Maintainer"
|
||||
}
|
||||
],
|
||||
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
|
||||
"homepage": "http://github.com/predis/predis",
|
||||
"keywords": [
|
||||
"nosql",
|
||||
"predis",
|
||||
"redis"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sponsors/tillkruss",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-05T19:02:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Log\\": "Psr/Log/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
"homepage": "https://github.com/php-fig/log",
|
||||
"keywords": [
|
||||
"log",
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2020-03-23T09:12:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "react/promise",
|
||||
"version": "v2.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/reactphp/promise.git",
|
||||
"reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4",
|
||||
"reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"React\\Promise\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jan Sorgalla",
|
||||
"email": "jsorgalla@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
|
||||
"keywords": [
|
||||
"promise",
|
||||
"promises"
|
||||
],
|
||||
"time": "2020-05-12T15:16:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty-gettext/smarty-gettext",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-gettext/smarty-gettext.git",
|
||||
"reference": "7361bcb6913cdfd39e5e37b17c84e08a26da0de2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-gettext/smarty-gettext/zipball/7361bcb6913cdfd39e5e37b17c84e08a26da0de2",
|
||||
"reference": "7361bcb6913cdfd39e5e37b17c84e08a26da0de2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-gettext": "*",
|
||||
"ext-pcre": "*",
|
||||
"php": "~5.3|~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"azatoth/php-pgettext": "~1.0",
|
||||
"smarty/smarty": "3.1.*"
|
||||
},
|
||||
"suggest": {
|
||||
"azatoth/php-pgettext": "Support msgctxt for {t} via context parameter"
|
||||
},
|
||||
"bin": [
|
||||
"tsmarty2c.php"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"block.t.php",
|
||||
"function.locale.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1+"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sagi Bashari",
|
||||
"email": "sagi@boom.org.il"
|
||||
},
|
||||
{
|
||||
"name": "Elan Ruusamäe",
|
||||
"email": "glen@delfi.ee"
|
||||
}
|
||||
],
|
||||
"description": "Gettext plugin enabling internationalization in Smarty Package files",
|
||||
"homepage": "https://github.com/smarty-gettext/smarty-gettext",
|
||||
"time": "2016-06-13T10:54:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
"version": "v3.1.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-php/smarty.git",
|
||||
"reference": "0b24c4520b45706e4c62235655c952c32983fe5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/0b24c4520b45706e4c62235655c952c32983fe5e",
|
||||
"reference": "0b24c4520b45706e4c62235655c952c32983fe5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"libs/Smarty.class.php",
|
||||
"libs/SmartyBC.class.php",
|
||||
"libs/sysplugins/smarty_security.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Monte Ohrt",
|
||||
"email": "monte@ohrt.com"
|
||||
},
|
||||
{
|
||||
"name": "Uwe Tews",
|
||||
"email": "uwe.tews@googlemail.com"
|
||||
},
|
||||
{
|
||||
"name": "Rodney Rehm",
|
||||
"email": "rodney.rehm@medialize.de"
|
||||
}
|
||||
],
|
||||
"description": "Smarty - the compiling PHP template engine",
|
||||
"homepage": "http://www.smarty.net",
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2014-10-31T00:35:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "xxtea/xxtea",
|
||||
"version": "v1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xxtea/xxtea-php.git",
|
||||
"reference": "766edc74ae89454cdaab24ee297fb64a9482698c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/xxtea/xxtea-php/zipball/766edc74ae89454cdaab24ee297fb64a9482698c",
|
||||
"reference": "766edc74ae89454cdaab24ee297fb64a9482698c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=4.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"xxtea.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ma Bingyao",
|
||||
"email": "mabingyao@gmail.com",
|
||||
"homepage": "https://github.com/xxtea/xxtea-php",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "XXTEA is a fast and secure encryption algorithm. This is a XXTEA library for PHP.",
|
||||
"homepage": "https://github.com/xxtea/xxtea-php",
|
||||
"keywords": [
|
||||
"crypt",
|
||||
"cryptography",
|
||||
"decrypt",
|
||||
"encrypt",
|
||||
"library",
|
||||
"security",
|
||||
"xxtea"
|
||||
],
|
||||
"time": "2016-02-13T11:45:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zf1/zend-cache",
|
||||
"version": "1.12.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zf1/zend-cache.git",
|
||||
"reference": "c3a6fc20f5d5c5ab7adc16f29f33eb5b2e00d86e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zf1/zend-cache/zipball/c3a6fc20f5d5c5ab7adc16f29f33eb5b2e00d86e",
|
||||
"reference": "c3a6fc20f5d5c5ab7adc16f29f33eb5b2e00d86e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.11",
|
||||
"zf1/zend-exception": "self.version"
|
||||
},
|
||||
"suggest": {
|
||||
"zf1/zend-log": "Used in special situations or with special adapters"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Zend_Cache": "library/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "Zend Framework 1 Cache package",
|
||||
"homepage": "http://framework.zend.com/",
|
||||
"keywords": [
|
||||
"ZF1",
|
||||
"cache",
|
||||
"framework",
|
||||
"zend"
|
||||
],
|
||||
"time": "2015-04-30T11:07:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zf1/zend-exception",
|
||||
"version": "1.12.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zf1/zend-exception.git",
|
||||
"reference": "ca30959d3e2f522f481a3d1459386acf1aa4ca74"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zf1/zend-exception/zipball/ca30959d3e2f522f481a3d1459386acf1aa4ca74",
|
||||
"reference": "ca30959d3e2f522f481a3d1459386acf1aa4ca74",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.11"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Zend_Exception": "library/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "Zend Framework 1 Exception package",
|
||||
"homepage": "http://framework.zend.com/",
|
||||
"keywords": [
|
||||
"ZF1",
|
||||
"exception",
|
||||
"framework",
|
||||
"zend"
|
||||
],
|
||||
"time": "2015-04-30T11:10:20+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "1.1.0"
|
||||
}
|
1
deploy
1
deploy
|
@ -1 +0,0 @@
|
|||
Subproject commit 3510448cdd747c63ea3bd69ae0217810ffa79c0c
|
BIN
deploy_rsa.enc
BIN
deploy_rsa.enc
Binary file not shown.
|
@ -1,57 +1,49 @@
|
|||
version: '3.7'
|
||||
|
||||
volumes:
|
||||
db:
|
||||
redis:
|
||||
static:
|
||||
elastic:
|
||||
storage:
|
||||
database:
|
||||
elastic:
|
||||
|
||||
services:
|
||||
php-fpm:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/php/Dockerfile
|
||||
target: dev
|
||||
ports:
|
||||
- '9000:9000'
|
||||
- '39000:39000'
|
||||
dockerfile: docker/tabun/Dockerfile
|
||||
target: production
|
||||
#TODO target: development
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/vendor
|
||||
- static:/static
|
||||
- storage:/storage
|
||||
depends_on:
|
||||
- mariadb
|
||||
- db
|
||||
- redis
|
||||
- tasks
|
||||
environment:
|
||||
MARIADB_USER: ${MARIADB_USER:-tabun}
|
||||
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-tabun}
|
||||
MARIADB_DATABASE: ${MARIADB_DATABASE:-tabun}
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- tabun
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/php/Dockerfile
|
||||
target: frontend
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
- static:/app/static
|
||||
command: npm run build-dev
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/nginx/Dockerfile
|
||||
gateway:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- '8000:80'
|
||||
restart: always
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./docker/gateway/nginx.conf:/etc/nginx/nginx.conf
|
||||
- static:/app/static
|
||||
- storage:/storage
|
||||
depends_on:
|
||||
- php-fpm
|
||||
|
||||
mariadb:
|
||||
depends_on:
|
||||
- app
|
||||
|
||||
db:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/mariadb/Dockerfile
|
||||
|
@ -62,12 +54,9 @@ services:
|
|||
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: ${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-true}
|
||||
volumes:
|
||||
- ./docker/mariadb/conf.d:/etc/mysql/conf.d/
|
||||
- database:/var/lib/mysql
|
||||
- db:/var/lib/mysql
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
|
||||
celery:
|
||||
tasks:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/celery/Dockerfile
|
||||
|
@ -78,6 +67,14 @@ services:
|
|||
- CELERY_MAILER_PORT=1025
|
||||
command: celery worker --pool=solo
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- redis:/data
|
||||
networks:
|
||||
default:
|
||||
|
||||
elastic:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16
|
||||
volumes:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
FROM python:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir \
|
||||
|
@ -6,6 +7,6 @@ RUN pip install --no-cache-dir \
|
|||
beautifulsoup4 \
|
||||
'elasticsearch>=5.0,<6.0'
|
||||
|
||||
WORKDIR /app
|
||||
COPY celery_tasks /app
|
||||
COPY docker/celery/celeryconfig.py /app/celeryconfig.py
|
||||
COPY docker/celery /app
|
||||
|
||||
CMD ["celery" "worker" "--pool=solo"]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /app/templates/skin/synio/locale/ru_RU/LC_MESSAGES
|
||||
cd /frontend/templates/skin/synio/locale/ru_RU/LC_MESSAGES
|
||||
msgcat -n -F -o messages.po parts/*
|
||||
msgfmt messages.po
|
||||
npx po2json -f jed1.x messages.po messages.json
|
|
@ -0,0 +1,69 @@
|
|||
worker_processes auto;
|
||||
user nginx;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
|
||||
#tcp_nopush on;
|
||||
#gzip on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
client_max_body_size 128M;
|
||||
|
||||
limit_conn_zone $binary_remote_addr zone=nginx_conn_limit:16m;
|
||||
limit_conn nginx_conn_limit 100;
|
||||
limit_conn_log_level info;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
root /app;
|
||||
|
||||
# TODO errors
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_read_timeout 600;
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /(classes|config|engine|templates|settings)/.*\.php {
|
||||
deny all;
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /storage {
|
||||
alias /storage;
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
|
||||
location /static {
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
ENV TZ=Europe/Moscow
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
|
@ -1,36 +0,0 @@
|
|||
client_max_body_size 16M;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /app;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php-fpm:9000;
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_read_timeout 600;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /(classes|config|engine|templates) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /storage {
|
||||
alias /storage;
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
|
||||
location /static {
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
FROM alpine:3.13 AS frontend
|
||||
|
||||
WORKDIR /app
|
||||
RUN apk add npm gettext git
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN sh ./docker/compile_locales.sh
|
||||
RUN mkdir -p ./static
|
||||
RUN git describe --always > /app/static/backend.version
|
||||
|
||||
FROM frontend AS frontend-prod
|
||||
RUN npm run build
|
||||
|
||||
FROM php:7.4-fpm AS dev
|
||||
|
||||
ENV TZ=Europe/Moscow
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
unzip libzip-dev git \
|
||||
libonig-dev \
|
||||
libcurl4-openssl-dev \
|
||||
imagemagick libmagickwand-dev libmagickcore-dev \
|
||||
locales \
|
||||
&& pecl install imagick redis xdebug && docker-php-ext-enable imagick redis xdebug \
|
||||
&& docker-php-ext-install mysqli gettext json curl bcmath mbstring zip \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.17 \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-source delete \
|
||||
&& sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
|
||||
ENTRYPOINT ["docker-php-entrypoint"]
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./docker/php/www-dev.conf /usr/local/etc/php-fpm.d/www.conf
|
||||
COPY composer.* ./
|
||||
RUN composer install
|
||||
|
||||
RUN mkdir -p /storage
|
||||
RUN chown www-data:www-data /storage
|
||||
VOLUME /storage
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
|
||||
FROM dev AS prod
|
||||
COPY . .
|
||||
COPY --from=frontend-prod /app/static /static
|
||||
COPY ./docker/php/www-dev.conf /usr/local/etc/php-fpm.d/www.conf
|
||||
RUN composer install --no-dev --no-interaction --optimize-autoloader \
|
||||
&& composer clearcache \
|
||||
&& chown -R www-data:www-data .
|
|
@ -1,49 +0,0 @@
|
|||
[global]
|
||||
pid = /run/php.pid
|
||||
|
||||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = 0.0.0.0:9000
|
||||
|
||||
pm = static
|
||||
pm.max_children = 4
|
||||
|
||||
pm.status_path = /status
|
||||
|
||||
php_value[error_log] = /proc/self/fd/3
|
||||
php_value[mail.log] = /proc/self/fd/2
|
||||
|
||||
php_value[max_execution_time] = 60
|
||||
php_value[post_max_size] = 32M
|
||||
php_value[upload_max_filesize] = 32M
|
||||
php_value[date.timezone] = Europe/Moscow
|
||||
php_value[intl.default_locale] = ru_RU
|
||||
|
||||
php_value[session.save_handler] = redis
|
||||
php_value[session.save_path] = "tcp://redis:6379?database=3"
|
||||
php_value[session.gc_maxlifetime] = 21600
|
||||
|
||||
php_flag[short_open_tag] = on
|
||||
php_flag[ignore_repeated_errors] = on
|
||||
php_flag[html_errors] = off
|
||||
php_flag[cgi.fix_pathinfo] = off
|
||||
php_flag[sql.safe_mode] = off
|
||||
|
||||
php_flag[xdebug.remote_autostart] = on
|
||||
php_flag[xdebug.remote_enable] = on
|
||||
php_value[xdebug.remote_handler] = dbgp
|
||||
php_value[xdebug.remote_mode] = req
|
||||
php_value[xdebug.remote_host] = 0.0.0.0
|
||||
php_value[xdebug.remote_port] = 39000
|
||||
|
||||
php_flag[xdebug.collect_includes] = on
|
||||
php_flag[xdebug.collect_params] = on
|
||||
php_flag[xdebug.collect_return] = on
|
||||
php_flag[xdebug.default_enable] = on
|
||||
php_value[xdebug.extended_info] = 1
|
||||
php_value[xdebug.show_local_vars] = 1
|
||||
php_value[xdebug.show_mem_delta] = 0
|
||||
php_value[xdebug.idekey] = tabun
|
||||
|
||||
env[CONFIG] = /app/settings/dev.php
|
|
@ -0,0 +1,78 @@
|
|||
FROM alpine:3.13 AS frontend
|
||||
|
||||
COPY . /frontend
|
||||
COPY docker/frontend /frontend
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
RUN apk add npm gettext git
|
||||
RUN mkdir -p /frontend/static && sh /frontend/compile_locales.sh
|
||||
RUN npm install
|
||||
|
||||
|
||||
FROM frontend AS frontend-production
|
||||
RUN npm run build
|
||||
RUN git describe --always > /frontend/static/backend.version
|
||||
|
||||
#FROM frontend AS frontend-development
|
||||
#RUN npm run build
|
||||
#RUN npm run build-dev
|
||||
|
||||
|
||||
|
||||
|
||||
FROM php:7.4-fpm AS backend
|
||||
|
||||
ENV TZ=Europe/Moscow
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
unzip libzip-dev git \
|
||||
libonig-dev \
|
||||
libcurl4-openssl-dev \
|
||||
imagemagick libmagickwand-dev libmagickcore-dev \
|
||||
locales \
|
||||
&& pecl install imagick redis xdebug && docker-php-ext-enable imagick redis xdebug \
|
||||
&& docker-php-ext-install mysqli gettext json curl bcmath mbstring zip \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.17 \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-source delete \
|
||||
&& sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
|
||||
COPY index.php /app/index.php
|
||||
COPY engine /app/engine
|
||||
COPY classes /app/classes
|
||||
COPY settings /app/settings
|
||||
COPY templates /app/templates
|
||||
|
||||
COPY docker/tabun /backend
|
||||
|
||||
WORKDIR /backend
|
||||
|
||||
RUN composer update && composer install --no-dev --no-interaction --optimize-autoloader && \
|
||||
composer clearcache && \
|
||||
cp -r /backend/vendor /app/vendor && \
|
||||
rm -rf /backend
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p /storage
|
||||
RUN chown www-data:www-data /storage
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
FROM backend AS production
|
||||
|
||||
COPY --from=frontend-production /frontend/static /static
|
||||
COPY ./docker/tabun/tabun-dev.conf /usr/local/etc/php-fpm.d/www.conf
|
||||
|
||||
#FROM backend as development
|
||||
#
|
||||
#COPY --from=frontend-development /frontend/static /static
|
||||
#COPY ./docker/tabun/tabun.conf /usr/local/etc/php-fpm.d/tabun.conf
|
||||
#RUN composer install --no-dev --no-interaction --optimize-autoloader && \
|
||||
# composer clearcache && \#
|
||||
# cp -r /backend/vendor /app/vendor && \
|
||||
# rm -rf /backend
|
||||
#
|
||||
#WORKDIR /app
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
"repositories": [
|
||||
{
|
||||
"url": "https://gitea.everypony.ru/everypony/zend-cache-redis.git",
|
||||
"type": "git"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"agelxnash/jevix": "1.2.1",
|
||||
"smarty/smarty": "3.1.11",
|
|
@ -0,0 +1,47 @@
|
|||
[global]
|
||||
pid = /run/php.pid
|
||||
|
||||
[www]
|
||||
listen = 0.0.0.0:9000
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
pm = static
|
||||
pm.max_children = 4
|
||||
|
||||
php_value[mail.log] = /proc/self/fd/2
|
||||
php_value[error_log] = /proc/self/fd/3
|
||||
|
||||
php_value[max_execution_time] = 60
|
||||
php_value[post_max_size] = 32M
|
||||
php_value[upload_max_filesize] = 32M
|
||||
php_value[date.timezone] = Europe/Moscow
|
||||
php_value[intl.default_locale] = ru_RU
|
||||
|
||||
php_value[session.save_handler] = redis
|
||||
php_value[session.save_path] = "tcp://redis:6379?database=3"
|
||||
php_value[session.gc_maxlifetime] = 21600
|
||||
|
||||
php_flag[short_open_tag] = on
|
||||
php_flag[ignore_repeated_errors] = on
|
||||
php_flag[html_errors] = off
|
||||
php_flag[cgi.fix_pathinfo] = off
|
||||
php_flag[sql.safe_mode] = off
|
||||
|
||||
env[CONFIG] = /app/settings/app.conf.php
|
||||
|
||||
php_flag[xdebug.remote_autostart] = on
|
||||
php_flag[xdebug.remote_enable] = on
|
||||
php_value[xdebug.remote_handler] = dbgp
|
||||
php_value[xdebug.remote_mode] = req
|
||||
php_value[xdebug.remote_host] = 0.0.0.0
|
||||
php_value[xdebug.remote_port] = 39000
|
||||
|
||||
php_flag[xdebug.collect_includes] = on
|
||||
php_flag[xdebug.collect_params] = on
|
||||
php_flag[xdebug.collect_return] = on
|
||||
php_flag[xdebug.default_enable] = on
|
||||
php_value[xdebug.extended_info] = 1
|
||||
php_value[xdebug.show_local_vars] = 1
|
||||
php_value[xdebug.show_mem_delta] = 0
|
||||
php_value[xdebug.idekey] = tabun
|
|
@ -0,0 +1,36 @@
|
|||
[global]
|
||||
pid = /run/php.pid
|
||||
|
||||
[www]
|
||||
listen = 0.0.0.0:9000
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 32
|
||||
pm.max_requests = 10000
|
||||
pm.start_servers = 4
|
||||
pm.min_spare_servers = 2
|
||||
pm.max_spare_servers = 6
|
||||
pm.process_idle_timeout = 2s
|
||||
|
||||
php_value[mail.log] = /proc/self/fd/2
|
||||
php_value[error_log] = /proc/self/fd/3
|
||||
|
||||
php_value[max_execution_time] = 60
|
||||
php_value[post_max_size] = 32M
|
||||
php_value[upload_max_filesize] = 32M
|
||||
php_value[date.timezone] = Europe/Moscow
|
||||
php_value[intl.default_locale] = ru_RU
|
||||
|
||||
php_value[session.save_handler] = redis
|
||||
php_value[session.save_path] = "tcp://redis:6379?database=3"
|
||||
php_value[session.gc_maxlifetime] = 21600
|
||||
|
||||
php_flag[short_open_tag] = on
|
||||
php_flag[ignore_repeated_errors] = on
|
||||
php_flag[html_errors] = off
|
||||
php_flag[cgi.fix_pathinfo] = off
|
||||
php_flag[sql.safe_mode] = off
|
||||
|
||||
env[CONFIG] = /app/settings/app.conf.php
|
|
@ -1,17 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 512Mi
|
||||
cpu-shares: 1024
|
||||
environ:
|
||||
PYTHONPATH: /config/celeryconfig:/app
|
||||
CELERY_CONFIG_MODULE: cfg
|
||||
CELERY_MAILER_HOST: localhost
|
||||
CELERY_MAILER_PORT: 25
|
||||
workdir: /app
|
||||
executable: /usr/bin/celery
|
||||
arguments:
|
||||
- worker
|
||||
- --pool=solo
|
|
@ -1,24 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 256Mi
|
||||
mode: 0o1777
|
||||
/storage: !Persistent
|
||||
path: /storage/elastic
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/elastic
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 3Gi
|
||||
cpu-shares: 1024
|
||||
workdir: /usr/share/elasticsearch
|
||||
executable: ./bin/elasticsearch
|
|
@ -1,35 +0,0 @@
|
|||
kind: Command
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Persistent
|
||||
path: /storage/mysql_tmp
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/storage: !Persistent
|
||||
path: /storage/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/backup: !Persistent
|
||||
path: /backup/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 200ki
|
||||
memory-limit: 8Gi
|
||||
cpu-shares: 1024
|
||||
interactive: true
|
||||
executable: /usr/bin/innobackupex
|
||||
arguments: []
|
|
@ -1,35 +0,0 @@
|
|||
kind: Command
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Persistent
|
||||
path: /storage/mysql_tmp
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/storage: !Persistent
|
||||
path: /storage/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/backup: !Persistent
|
||||
path: /backup/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 200ki
|
||||
memory-limit: 1Gi
|
||||
cpu-shares: 128
|
||||
interactive: true
|
||||
executable: /bin/mkdir
|
||||
arguments: []
|
|
@ -1,36 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Persistent
|
||||
path: /storage/mysql_tmp
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/storage: !Persistent
|
||||
path: /storage/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/backup: !Persistent
|
||||
path: /backup/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 200ki
|
||||
memory-limit: 25Gi # Will be decreased later
|
||||
cpu-shares: 1024
|
||||
executable: /usr/bin/mysqld_safe
|
||||
arguments:
|
||||
- --skip-syslog
|
||||
- --console
|
||||
- --debug-gdb
|
|
@ -1,23 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
fileno-limit: 200ki
|
||||
memory-limit: 8Gi
|
||||
cpu-shares: 1024
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 256Mi
|
||||
mode: 0o1777
|
||||
/storage: !Persistent
|
||||
path: /external
|
||||
/log: !Persistent
|
||||
path: /log/php
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/local: !Readonly /local
|
||||
workdir: /app
|
||||
executable: /usr/bin/php-fpm
|
||||
arguments:
|
||||
- -FO
|
|
@ -1,17 +0,0 @@
|
|||
kind: Command
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/storage: !Persistent
|
||||
path: /storage/redis
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 256Mi
|
||||
cpu-shares: 128
|
||||
interactive: true
|
||||
executable: /usr/bin/redis-cli
|
||||
arguments: []
|
|
@ -1,15 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/var/lib/redis: !Persistent
|
||||
path: /storage/redis
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 2Gi
|
||||
cpu-shares: 1024
|
||||
executable: /usr/bin/redis-server
|
||||
arguments: [--port, 6589]
|
|
@ -1,17 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 512Mi
|
||||
cpu-shares: 1024
|
||||
environ:
|
||||
PYTHONPATH: /config/celeryconfig:/app
|
||||
CELERY_CONFIG_MODULE: cfg
|
||||
CELERY_MAILER_HOST: localhost
|
||||
CELERY_MAILER_PORT: 25
|
||||
workdir: /app
|
||||
executable: /usr/bin/celery
|
||||
arguments:
|
||||
- worker
|
||||
- --pool=solo
|
|
@ -1,24 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 256Mi
|
||||
mode: 0o1777
|
||||
/storage: !Persistent
|
||||
path: /storage/elastic
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/elastic
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 3Gi
|
||||
cpu-shares: 1024
|
||||
workdir: /usr/share/elasticsearch
|
||||
executable: ./bin/elasticsearch
|
|
@ -1,20 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
fileno-limit: 100ki
|
||||
memory-limit: 1Gi
|
||||
cpu-shares: 128
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 127Mi
|
||||
mode: 0o1777
|
||||
/log: !Persistent
|
||||
path: /log/php
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
environ:
|
||||
HOME: /opt
|
||||
executable: /usr/bin/log.io-harvester
|
||||
arguments: []
|
|
@ -1,20 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
fileno-limit: 100ki
|
||||
memory-limit: 1Gi
|
||||
cpu-shares: 128
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 127Mi
|
||||
mode: 0o1777
|
||||
/log: !Persistent
|
||||
path: /log/php
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
environ:
|
||||
HOME: /opt
|
||||
executable: /usr/bin/log.io-server
|
||||
arguments: []
|
|
@ -1,26 +0,0 @@
|
|||
kind: Command
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 128Mi
|
||||
mode: 0o1777
|
||||
/storage: !Persistent
|
||||
path: /storage/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/backup: !Persistent
|
||||
path: /backup/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 2Gi
|
||||
cpu-shares: 1024
|
||||
interactive: true
|
||||
executable: /usr/bin/innobackupex
|
||||
arguments: []
|
|
@ -1,35 +0,0 @@
|
|||
kind: Command
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Persistent
|
||||
path: /storage/mysql_tmp
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/storage: !Persistent
|
||||
path: /storage/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/backup: !Persistent
|
||||
path: /backup/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 200ki
|
||||
memory-limit: 1Gi
|
||||
cpu-shares: 128
|
||||
interactive: true
|
||||
executable: /bin/mkdir
|
||||
arguments: []
|
|
@ -1,27 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 128Mi
|
||||
mode: 0o1777
|
||||
/storage: !Persistent
|
||||
path: /storage/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/backup: !Persistent
|
||||
path: /backup/mysql
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 2Gi
|
||||
cpu-shares: 1024
|
||||
executable: /usr/bin/mysqld_safe
|
||||
arguments:
|
||||
- --skip-syslog
|
||||
- --console
|
||||
- --debug-gdb
|
|
@ -1,26 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
fileno-limit: 100ki
|
||||
memory-limit: 4Gi
|
||||
cpu-shares: 1024
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/tmp: !Tmpfs
|
||||
size: 256Mi
|
||||
mode: 0o1777
|
||||
/storage: !Persistent
|
||||
path: /storage/php
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
/log: !Persistent
|
||||
path: /log/php
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
workdir: /app
|
||||
executable: /usr/bin/php-fpm
|
||||
arguments:
|
||||
- -FO
|
|
@ -1,17 +0,0 @@
|
|||
kind: Command
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/storage: !Persistent
|
||||
path: /storage/redis
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 256Mi
|
||||
cpu-shares: 128
|
||||
interactive: true
|
||||
executable: /usr/bin/redis-cli
|
||||
arguments: []
|
|
@ -1,15 +0,0 @@
|
|||
user-id: 1
|
||||
group-id: 1
|
||||
volumes:
|
||||
/state: !Statedir {}
|
||||
/var/lib/redis: !Persistent
|
||||
path: /storage/redis
|
||||
mkdir: true
|
||||
mode: 0o700
|
||||
user: 1
|
||||
group: 1
|
||||
fileno-limit: 50ki
|
||||
memory-limit: 256Mi
|
||||
cpu-shares: 128
|
||||
executable: /usr/bin/redis-server
|
||||
arguments: [--port, 6579]
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$config['path']['root']['web'] = 'http://' . $_SERVER['HTTP_HOST'];
|
||||
|
||||
$config['db']['params']['host'] = 'mariadb';
|
||||
$config['db']['params']['host'] = 'db';
|
||||
$config['db']['params']['port'] = '3306';
|
||||
$config['db']['params']['user'] = $_ENV["MARIADB_USER"] ?? 'tabun';
|
||||
$config['db']['params']['pass'] = $_ENV["MARIADB_PASSWORD"] ?? 'tabun';
|
||||
|
@ -37,7 +37,7 @@ $config['sys']['logs']['dir'] = '/log';
|
|||
$config['misc']['debug'] = true;
|
||||
|
||||
$config['misc']['services']['twicher'] = 'http://127.0.0.1:5000/quotes/twitchy';
|
||||
$config['misc']['services']['donations'] = 'https://everypony.ru/donate_api/';
|
||||
$config['misc']['services']['banners'] = 'https://projects.everypony.ru/banners/';
|
||||
$config['misc']['services']['donations'] = 'https://everypony.ru/donate_api/index.json';
|
||||
$config['misc']['services']['banners'] = 'https://everypony.ru/donate_api/posters/poinc.json';
|
||||
|
||||
return $config;
|
337
vagga.yaml
337
vagga.yaml
|
@ -1,337 +0,0 @@
|
|||
minimum-vagga: v0.8.0
|
||||
|
||||
mixins:
|
||||
- vagga/trunk.yaml
|
||||
- vagga/production.yaml
|
||||
|
||||
containers:
|
||||
_base_alpine:
|
||||
setup:
|
||||
- !Alpine v3.8
|
||||
- !EnsureDir /config
|
||||
- !Sh "chmod +r /bin/bbsuid"
|
||||
|
||||
frontend:
|
||||
setup:
|
||||
- !Container _base_alpine
|
||||
- !Env
|
||||
TRAVIS: true
|
||||
NODE_PATH: /usr/lib/node_modules
|
||||
- !EnsureDir /usr/lib/node_modules/.cache
|
||||
- !NpmDependencies
|
||||
file: package.json
|
||||
peer: true
|
||||
optional: true
|
||||
dev: true
|
||||
- !Install
|
||||
- gettext
|
||||
environ:
|
||||
NODE_PATH: /usr/lib/node_modules
|
||||
volumes:
|
||||
/work/node_modules: !Empty
|
||||
|
||||
assets:
|
||||
setup:
|
||||
- !Container frontend
|
||||
- !EnsureDir /static
|
||||
- !RunAs
|
||||
work-dir: templates/skin/synio/locale/ru_RU/LC_MESSAGES
|
||||
script: &compile_locales |
|
||||
msgcat -n -F -o messages.po parts/*
|
||||
msgfmt messages.po
|
||||
po2json -f jed1.x messages.po messages.json
|
||||
rm messages.po
|
||||
- !Build
|
||||
container: frontend
|
||||
source: /usr/lib/node_modules
|
||||
temporary-mount: /work/node_modules
|
||||
- !Env
|
||||
NODE_ENV: production
|
||||
NODE_PATH: /usr/lib/node_modules
|
||||
BABEL_CACHE_PATH: /tmp/.babel.json
|
||||
- !Sh webpack --color --progress -p
|
||||
- !Copy
|
||||
source: /work/static
|
||||
path: /static
|
||||
data-dirs: [/static]
|
||||
|
||||
celery-dev:
|
||||
setup:
|
||||
- !Container _base_alpine
|
||||
- !Install [python3]
|
||||
- !PipConfig
|
||||
dependencies: true
|
||||
- !Py3Install
|
||||
- celery[redis]
|
||||
- beautifulsoup4
|
||||
- elasticsearch
|
||||
- !EnsureDir /app
|
||||
|
||||
redis-dev:
|
||||
setup:
|
||||
- !Container _base_alpine
|
||||
- !Install [redis]
|
||||
|
||||
nginx:
|
||||
setup:
|
||||
- !Container _base_alpine
|
||||
- !Install [nginx]
|
||||
- !EnsureDir /storage
|
||||
|
||||
mysql-dev:
|
||||
setup:
|
||||
- !Container _base_alpine
|
||||
- !Install
|
||||
- mariadb
|
||||
- mariadb-client
|
||||
- !EnsureDir /storage
|
||||
|
||||
_php-base:
|
||||
setup:
|
||||
- !Ubuntu bionic
|
||||
- !UbuntuUniverse
|
||||
- !Install
|
||||
- php
|
||||
- php-fpm
|
||||
- php-mysql
|
||||
- php-redis
|
||||
- php-gettext
|
||||
- php-json
|
||||
- php-curl
|
||||
- php-imagick
|
||||
- php-bcmath
|
||||
- php-mbstring
|
||||
- imagemagick
|
||||
- !BuildDeps [unzip]
|
||||
- !ComposerConfig
|
||||
install_runtime: false
|
||||
runtime_exe: /usr/bin/php
|
||||
- !ComposerDependencies
|
||||
optimize_autoloader: true
|
||||
- !EnsureDir /log
|
||||
- !EnsureDir /storage
|
||||
- !EnsureDir /config
|
||||
- !EnsureDir /static
|
||||
- !EnsureDir /app
|
||||
|
||||
php-dev:
|
||||
setup:
|
||||
- !Container _php-base
|
||||
- !Install
|
||||
- php-xdebug
|
||||
- git
|
||||
|
||||
elastic-dev:
|
||||
setup:
|
||||
- !Ubuntu bionic
|
||||
- !UbuntuUniverse
|
||||
- !EnsureDir /config
|
||||
- !BuildDeps [gnupg]
|
||||
- !AptTrust
|
||||
server: keyserver.ubuntu.com
|
||||
keys: [D27D666CD88E42B4]
|
||||
- !UbuntuRepo
|
||||
url: https://artifacts.elastic.co/packages/6.x/apt
|
||||
suite: stable
|
||||
components: [main]
|
||||
- !Install
|
||||
- ca-certificates
|
||||
- ca-certificates-java
|
||||
- openjdk-8-jre-headless
|
||||
- elasticsearch=6.2.3
|
||||
- !EnsureDir /storage
|
||||
|
||||
mail-dev:
|
||||
setup:
|
||||
- !Alpine v3.8
|
||||
- !Install [libstdc++, ruby-json, ruby-etc, sqlite-libs]
|
||||
- !BuildDeps [sqlite-dev]
|
||||
- !GemInstall [mailcatcher]
|
||||
|
||||
commands:
|
||||
_mk-node-modules-dir: !Command
|
||||
container: _base_alpine
|
||||
run: mkdir -p /work/node_modules
|
||||
|
||||
_init_db: !Command
|
||||
description: Initialize and populate MySQL database
|
||||
container: mysql-dev
|
||||
environ:
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_DATABASE: tabun
|
||||
DB_USERNAME: tabun
|
||||
DB_PASSWORD: tabun
|
||||
run: |
|
||||
mysql_install_db
|
||||
mysqld_safe --skip-syslog --no-auto-restart
|
||||
while [ ! -f /tmp/mysqld.pid ]; do sleep 0.1; done
|
||||
mysqladmin create $DB_DATABASE
|
||||
mysql -e "CREATE USER '$DB_USERNAME'@'$DB_HOST' IDENTIFIED BY '$DB_PASSWORD';"
|
||||
mysql -e "GRANT ALL PRIVILEGES ON $DB_DATABASE.* TO '$DB_USERNAME'@'$DB_HOST';"
|
||||
mysqladmin flush-privileges
|
||||
|
||||
MYSQL="mysql --user=$DB_USERNAME --password=$DB_PASSWORD --database=$DB_DATABASE"
|
||||
|
||||
for migration in $(ls -v /work/fixtures/migrations) ; do
|
||||
echo "Applying migration $migration"
|
||||
$MYSQL < /work/fixtures/migrations/$migration
|
||||
done
|
||||
|
||||
for data in $(ls -v /work/fixtures/data) ; do
|
||||
echo "Populating database with $data"
|
||||
$MYSQL < /work/fixtures/data/$data
|
||||
done
|
||||
|
||||
mysqladmin shutdown
|
||||
volumes:
|
||||
/etc/mysql: !BindRO /work/config/local/mysql
|
||||
/storage: !Persistent {name: mysql}
|
||||
|
||||
_load_fixture: !Command
|
||||
description: Load fixture into database
|
||||
container: mysql-dev
|
||||
environ:
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_DATABASE: tabun
|
||||
DB_USERNAME: tabun
|
||||
DB_PASSWORD: tabun
|
||||
accepts-arguments: true
|
||||
run: |
|
||||
mysqld_safe --skip-syslog --no-auto-restart
|
||||
while [ ! -f /tmp/mysqld.pid ]; do sleep 0.1; done
|
||||
if [ "$#" = 1 ] ; then
|
||||
case "$1" in
|
||||
*.gz )
|
||||
echo "Loading compressed data from $1"
|
||||
viewer=zcat
|
||||
;;
|
||||
*)
|
||||
echo "Loading raw data from $1"
|
||||
viewer=cat
|
||||
;;
|
||||
esac
|
||||
$viewer $1 | mysql --user=$DB_USERNAME --password=$DB_PASSWORD --database=$DB_DATABASE
|
||||
fi
|
||||
mysqladmin shutdown
|
||||
|
||||
build-static: !Command
|
||||
description: Build static
|
||||
container: frontend
|
||||
prerequisites: [compile-locales]
|
||||
volumes: &node_volumes
|
||||
/work/node_modules: !BindRO /vagga/root/usr/lib/node_modules
|
||||
/usr/lib/node_modules/.cache: !Persistent node_cache
|
||||
run: webpack --color --progress -p
|
||||
|
||||
compile-locales: !Command
|
||||
container: frontend
|
||||
description: Comlile locale files
|
||||
work-dir: templates/skin/synio/locale/ru_RU/LC_MESSAGES
|
||||
run: *compile_locales
|
||||
|
||||
reindex: !Command
|
||||
container: php-dev
|
||||
description: Rebuild ES index
|
||||
work-dir: engine/console
|
||||
accepts-arguments: true
|
||||
environ:
|
||||
CONFIG: /config/app.conf.php
|
||||
COMPOSER_DIR: /usr/local/lib/composer
|
||||
run: [php, ls, reindex]
|
||||
|
||||
webpack: !Command
|
||||
container: frontend
|
||||
prerequisites: [_mk-node-modules-dir, compile-locales]
|
||||
description: Webpack CLI
|
||||
volumes: *node_volumes
|
||||
run: [webpack]
|
||||
|
||||
redis-cli: !Command
|
||||
container: redis-dev
|
||||
description: Run redis CLI
|
||||
run: [redis-cli]
|
||||
|
||||
redis: &redis !Command
|
||||
container: redis-dev
|
||||
description: Run redis server (cache and broker for celery)
|
||||
run: [redis-server, --port, 6379]
|
||||
volumes:
|
||||
/var/lib/redis: !Tmpfs
|
||||
|
||||
nginx: &nginx !Command
|
||||
container: nginx
|
||||
description: Run nginx webserver
|
||||
run: [nginx]
|
||||
volumes:
|
||||
/etc/nginx/nginx.conf: !BindRO /work/config/local/nginx.conf
|
||||
/storage: !Persistent {name: storage}
|
||||
/var/log/nginx: !Snapshot
|
||||
|
||||
mysql: &mysql !Command
|
||||
container: mysql-dev
|
||||
description: Run mysql database server
|
||||
user-id: 1
|
||||
external-user-id: 0
|
||||
run: mysqld_safe --skip-syslog --console --debug-gdb
|
||||
volumes:
|
||||
/etc/mysql: !BindRO /work/config/local/mysql
|
||||
/storage: !Persistent {name: mysql, init-command: _init_db}
|
||||
|
||||
mail: &mail !Command
|
||||
container: mail-dev
|
||||
description: Run simple mail server (just for test)
|
||||
run: [mailcatcher, --foreground]
|
||||
|
||||
celery: &celery !Command
|
||||
container: celery-dev
|
||||
description: Run celery worker for async tasks
|
||||
user-id: 1
|
||||
group-id: 1
|
||||
external-user-id: 0
|
||||
run: celery worker --pool=solo
|
||||
volumes:
|
||||
/config: !BindRO /work/config/local/celery
|
||||
/app: !BindRO /work/celery_tasks
|
||||
environ:
|
||||
PYTHONPATH: /config:/app
|
||||
CELERY_CONFIG_MODULE: cfg
|
||||
CELERY_MAILER_HOST: localhost
|
||||
CELERY_MAILER_PORT: 1025
|
||||
|
||||
php: &php !Command
|
||||
prerequisites: [compile-locales]
|
||||
container: php-dev
|
||||
description: Run php-fpm (application)
|
||||
user-id: 1
|
||||
external-user-id: 0
|
||||
run: [php-fpm7.2, -eFO]
|
||||
volumes:
|
||||
/config: !BindRO /work/config/local
|
||||
/storage: !Persistent {name: storage}
|
||||
/static: !BindRO /work/static
|
||||
/app: !BindRO /work
|
||||
/etc/php/7.2/fpm/pool.d/www.conf: !BindRO /work/config/local/php.conf
|
||||
/var/log: !Snapshot
|
||||
|
||||
elastic: &elastic !Command
|
||||
container: elastic-dev
|
||||
description: Run elasticsearch
|
||||
user-id: 1
|
||||
external-user-id: 0
|
||||
work-dir: /usr/share/elasticsearch
|
||||
run: ./bin/elasticsearch
|
||||
volumes:
|
||||
/etc/elasticsearch: !BindRO /work/config/local/elasticsearch
|
||||
/storage: !Persistent {name: elastic}
|
||||
|
||||
run: !Supervise
|
||||
description: Run full server stack
|
||||
kill-unresponsive-after: 5
|
||||
children:
|
||||
redis: *redis
|
||||
nginx: *nginx
|
||||
mysql: *mysql
|
||||
mail: *mail
|
||||
celery: *celery
|
||||
php: *php
|
||||
elastic: *elastic
|
|
@ -1,104 +0,0 @@
|
|||
_production_templates: # FIXME
|
||||
- &production_stuff
|
||||
- !Copy
|
||||
source: /work/config/production
|
||||
path: /config
|
||||
- !EnsureDir /local
|
||||
- !EnsureDir /log
|
||||
- !EnsureDir /lithos
|
||||
- !Copy
|
||||
source: /work/lithos/production
|
||||
path: /lithos
|
||||
- &production_host_resolution
|
||||
- !EnsureDir /state
|
||||
- !Sh |
|
||||
/bin/ln -sfn /state/hosts /etc/hosts
|
||||
/bin/ln -sfn /state/resolv.conf /etc/resolv.conf
|
||||
|
||||
containers:
|
||||
celery-production:
|
||||
setup:
|
||||
- !Container celery-dev
|
||||
- !*Unpack
|
||||
- *production_stuff
|
||||
- !Copy
|
||||
source: /work/celery_tasks
|
||||
path: /app
|
||||
- !Sh python3 -m compileall /app
|
||||
- !*Unpack
|
||||
- *production_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
redis-production:
|
||||
setup:
|
||||
- !Container redis-dev
|
||||
- !*Unpack
|
||||
- *production_stuff
|
||||
- *production_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
mysql-production:
|
||||
setup:
|
||||
- !Container mysql-dev
|
||||
- !*Unpack
|
||||
- *production_stuff
|
||||
- !Copy
|
||||
source: /config/mysql
|
||||
path: /etc/mysql
|
||||
- !*Unpack
|
||||
- *production_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
php-production:
|
||||
setup:
|
||||
- !Container _php-base
|
||||
- !*Unpack
|
||||
- *production_stuff
|
||||
- !Copy
|
||||
source: /config/php
|
||||
path: /etc/php/7.2/fpm
|
||||
- !EnsureDir /app
|
||||
- !Copy
|
||||
source: /work
|
||||
path: /app
|
||||
include-regex: ^(classes|settings|engine|templates)/*
|
||||
- !Copy
|
||||
source: /work/index.php
|
||||
path: /app/index.php
|
||||
# FIXME: Implicit locale build
|
||||
- !BuildDeps [git]
|
||||
- !Sh git describe --always > /app/backend.version
|
||||
- !Build
|
||||
container: assets
|
||||
source: /static
|
||||
path: /static
|
||||
- !*Unpack
|
||||
- *production_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
elastic-production:
|
||||
setup:
|
||||
- !Container elastic-dev
|
||||
- !*Unpack
|
||||
- *production_stuff
|
||||
- !Copy
|
||||
source: /config/elasticsearch
|
||||
path: /etc/elasticsearch
|
||||
- !*Unpack
|
||||
- *production_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
103
vagga/trunk.yaml
103
vagga/trunk.yaml
|
@ -1,103 +0,0 @@
|
|||
_trunk_templates: # FIXME
|
||||
- &trunk_stuff
|
||||
- !Copy
|
||||
source: /work/config/trunk
|
||||
path: /config
|
||||
- !EnsureDir /log
|
||||
- !EnsureDir /lithos
|
||||
- !Copy
|
||||
source: /work/lithos/trunk
|
||||
path: /lithos
|
||||
- &trunk_host_resolution
|
||||
- !EnsureDir /state
|
||||
- !Sh |
|
||||
/bin/ln -sfn /state/hosts /etc/hosts
|
||||
/bin/ln -sfn /state/resolv.conf /etc/resolv.conf
|
||||
|
||||
containers:
|
||||
celery-trunk:
|
||||
setup:
|
||||
- !Container celery-dev
|
||||
- !*Unpack
|
||||
- *trunk_stuff
|
||||
- !Copy
|
||||
source: /work/celery_tasks
|
||||
path: /app
|
||||
- !Sh python3 -m compileall /app
|
||||
- !*Unpack
|
||||
- *trunk_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
redis-trunk:
|
||||
setup:
|
||||
- !Container redis-dev
|
||||
- !*Unpack
|
||||
- *trunk_stuff
|
||||
- *trunk_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
mysql-trunk:
|
||||
setup:
|
||||
- !Container mysql-dev
|
||||
- !*Unpack
|
||||
- *trunk_stuff
|
||||
- !Copy
|
||||
source: /config/mysql
|
||||
path: /etc/mysql
|
||||
- !*Unpack
|
||||
- *trunk_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
php-trunk:
|
||||
setup:
|
||||
- !Container _php-base
|
||||
- !*Unpack
|
||||
- *trunk_stuff
|
||||
- !Copy
|
||||
source: /config/php
|
||||
path: /etc/php/7.2/fpm
|
||||
- !Copy
|
||||
source: /work
|
||||
path: /app
|
||||
include-regex: ^(classes|settings|engine|templates)/*
|
||||
- !Copy
|
||||
source: /work/index.php
|
||||
path: /app/index.php
|
||||
- !BuildDeps [gettext]
|
||||
# FIXME: Implicit locale build
|
||||
- !BuildDeps [git]
|
||||
- !Sh git describe --always > /app/backend.version
|
||||
- !Build
|
||||
container: assets
|
||||
source: /static
|
||||
path: /static
|
||||
- !*Unpack
|
||||
- *trunk_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
||||
|
||||
elastic-trunk:
|
||||
setup:
|
||||
- !Container elastic-dev
|
||||
- !*Unpack
|
||||
- *trunk_stuff
|
||||
- !Copy
|
||||
source: /config/elasticsearch
|
||||
path: /etc/elasticsearch
|
||||
- !*Unpack
|
||||
- *trunk_host_resolution
|
||||
volumes:
|
||||
/state: !Tmpfs
|
||||
resolv-conf-path: /state/resolv.conf
|
||||
hosts-file-path: /state/hosts
|
Loading…
Reference in New Issue