From 21358b07d68fb462e36e4e8d735263dff049519a Mon Sep 17 00:00:00 2001 From: Titan Auto-Deploy Script Date: Fri, 22 Oct 2021 11:07:19 -0400 Subject: [PATCH] Melhorias no deploy por Docker. --- .env.ci.example | 5 + .gitignore | 2 + README.md | 30 +- configure/alert.xml | 6 +- configure/api.xml | 46 +- configure/business.xml | 64 +-- configure/ldap.xml | 26 +- configure/log.xml | 412 +++++++++--------- configure/mail.xml | 76 ++-- configure/security.xml | 20 +- configure/shopping.xml | 36 +- configure/social.xml | 82 ++-- configure/titan.xml | 248 +++++------ configure/tool.xml | 6 +- configure/type.xml | 6 +- update/VERSION | 2 +- ...{00000000000000.sql => 20161001100001.sql} | 0 ...{20161004095701.sql => 20161001100002.sql} | 0 18 files changed, 536 insertions(+), 531 deletions(-) create mode 100644 .env.ci.example rename update/db/{00000000000000.sql => 20161001100001.sql} (100%) rename update/db/{20161004095701.sql => 20161001100002.sql} (100%) diff --git a/.env.ci.example b/.env.ci.example new file mode 100644 index 0000000..86c4c7b --- /dev/null +++ b/.env.ci.example @@ -0,0 +1,5 @@ +COMPOSE_PROJECT_NAME=your_instance_name +COMPOSE_PROFILES=development +ENVIRONMENT=development +PORT=8090 +DB=5433 diff --git a/.gitignore b/.gitignore index 60b0299..f1b8257 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ vendor .env +.env.ci +.env.backup log diff --git a/README.md b/README.md index 21a16fd..3fcdc1f 100644 --- a/README.md +++ b/README.md @@ -10,39 +10,29 @@ Titan was developed and is maintained by the partnership between the [Software E Getting Started --------------- -To create your project, use [Composer](https://getcomposer.org): +To create your project, use [PHP Composer](https://getcomposer.org): ```bash php composer.phar create-project titan-framework/instance path/to/local/folder ``` -After install, start [Vagrant](https://vagrantup.com) box to run your application. For this, install first [VirtualBox](https://www.virtualbox.org/wiki/Downloads) with it's Extension Pack. +Access the instance folder, copy the environment configuration files and change them at your convenience: +- ```.env.example``` » ```.env```; and +- ```.env.ci.example``` » ```.env.ci```. -**Warning!** Since version 6.0, the VirtualBox Guest Additions does not works properly anymore. To fix this issue, has a script `vagrant.sh` that need to run before `vagrant up` command. +Install [Docker](https://www.docker.com/). Then, run: -```bash -cd path/to/local/folder -./vagrant.sh -vagrant up ``` - -Alternatively, you can run your application as a [Docker](https://docker.com) container: - -```bash -cd path/to/local/folder -docker-compose up -d +env $(cat .env.ci) docker-compose up --build --force-recreate ``` -In Vagrant (recomended to **development** environments) your Titan instance will running at **http://localhost:8090**. To access, use "**admin**" as login and password. You can access shell using SSH at localhost:2222. All e-mail messages is getted by [MailHog](https://github.com/mailhog/MailHog), and you can access at **http://localhost:8025**. Now, you can modify the base-code to implement your requirements. +By default, your Titan instance will running at **http://localhost:8090**. To login, use "**admin**" as username and password. -In Docker (recomended to **test**, **homologation** and **production** environments) edit ```docker-compose.yml``` file in root directory to set correct ports for your infrastructure. +All e-mail messages is getted by [MailHog](https://github.com/mailhog/MailHog), and you can access at **http://localhost:8025**. + +Now, you can modify the base-code to implement your requirements. More Information ---------------- Read [official documentation](http://www.titanframework.com/docs/preface/) and [Titan Cookbook](https://github.com/titan-framework/docs/raw/master/Cookbook.pdf) (*in portuguese*) are the best ways to start using it. Access our [mailing list](https://groups.google.com/forum/#!forum/titan-framework) to learn advanced features and answer questions. - -Troubleshoot ------------- - -* If after "vagrant up" you receive a error of Titan's CORE not found, try pause your antvirus, destroy VM (with "vagrant destroy") and make up again (I had problems with Kaspersky). diff --git a/configure/alert.xml b/configure/alert.xml index ef59309..c2f6845 100644 --- a/configure/alert.xml +++ b/configure/alert.xml @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/configure/api.xml b/configure/api.xml index 5a5c436..e0bc973 100644 --- a/configure/api.xml +++ b/configure/api.xml @@ -1,20 +1,28 @@ - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/configure/business.xml b/configure/business.xml index 86b252a..52d0a2d 100644 --- a/configure/business.xml +++ b/configure/business.xml @@ -1,33 +1,33 @@ - - -
- -
- -
- -
+ + +
+ +
+ +
+ +
\ No newline at end of file diff --git a/configure/ldap.xml b/configure/ldap.xml index 5fc2490..91c723c 100644 --- a/configure/ldap.xml +++ b/configure/ldap.xml @@ -1,13 +1,13 @@ - - - - + + + + diff --git a/configure/log.xml b/configure/log.xml index a73d4db..c3c304a 100644 --- a/configure/log.xml +++ b/configure/log.xml @@ -1,206 +1,206 @@ - - - -Data: [_DATE_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - -Browser: -[_BROWSER_] - --- - -[_MESSAGE_] - - -Data: [_DATE_] -Nome: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - -Browser: -[_BROWSER_] - -More: -[_MESSAGE_] - - -Data: [_DATE_] -Nome: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - -Browser: -[_BROWSER_] - -More: -[_MESSAGE_] - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - --- - -[_MESSAGE_] - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Autor: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - --- - -[_MESSAGE_] - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Autor: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - --- - -[_MESSAGE_] - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Autor: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - --- - -[_MESSAGE_] - - -[_MESSAGE_] - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Autor: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - - -Data: [_DATE_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - -Browser: -[_BROWSER_] - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - --- - -[_MESSAGE_] - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - - -Data: [_DATE_] - -Seção: [_SECTION_] ([_COMPONENT_]) -Ação: [_ACTION_] ([_ENGINE_]) - -Autor: [_USER_NAME_] -Login: [_USER_LOGIN_] -E-mail: [_USER_MAIL_] -Tipo: [_USER_TYPE_] -ID do Usuário: [_USER_ID_] -IP: [_IP_] -Processado em [_BENCHMARK_] segundos - --- - -[_MESSAGE_] - - - + + + +Data: [_DATE_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +Browser: +[_BROWSER_] + +-- + +[_MESSAGE_] + + +Data: [_DATE_] +Nome: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +Browser: +[_BROWSER_] + +More: +[_MESSAGE_] + + +Data: [_DATE_] +Nome: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +Browser: +[_BROWSER_] + +More: +[_MESSAGE_] + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +-- + +[_MESSAGE_] + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Autor: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +-- + +[_MESSAGE_] + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Autor: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +-- + +[_MESSAGE_] + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Autor: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +-- + +[_MESSAGE_] + + +[_MESSAGE_] + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Autor: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + + +Data: [_DATE_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +Browser: +[_BROWSER_] + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +-- + +[_MESSAGE_] + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + + +Data: [_DATE_] + +Seção: [_SECTION_] ([_COMPONENT_]) +Ação: [_ACTION_] ([_ENGINE_]) + +Autor: [_USER_NAME_] +Login: [_USER_LOGIN_] +E-mail: [_USER_MAIL_] +Tipo: [_USER_TYPE_] +ID do Usuário: [_USER_ID_] +IP: [_IP_] +Processado em [_BENCHMARK_] segundos + +-- + +[_MESSAGE_] + + + diff --git a/configure/mail.xml b/configure/mail.xml index 90e9f5d..edda488 100644 --- a/configure/mail.xml +++ b/configure/mail.xml @@ -1,39 +1,39 @@ - - - - [NAME] - Cadastro de Senha - -Olá [USER], - -Você está recebendo este e-mail pois se cadastrou (ou foi cadastrado) no [NAME]. - -Se você não fez e desconhece qualquer requisição de registro para uso deste sistema, por favor, desconsidere este e-mail. - -Para efetivar agora mesmo seu cadastro no sistema, clique no link abaixo (ou copie e cole em seu navegador): - -[LINK] - -Sem mais, - -Equipe [NAME] - - - - [NAME] - Recadastro de Senha - -Olá [USER], - -Você está recebendo este e-mail pois solicitou a mudança de senha no [NAME]. - -Se você não fez nenhuma requisição de recadastramento de senha, por favor, desconsidere este e-mail. - -Para efetuar agora mesmo a escolha de sua nova senha, clique no link abaixo (ou copie e cole em seu navegador): - -[LINK] - -Sem mais, - -Equipe [NAME] - - + + + + [NAME] - Cadastro de Senha + +Olá [USER], + +Você está recebendo este e-mail pois se cadastrou (ou foi cadastrado) no [NAME]. + +Se você não fez e desconhece qualquer requisição de registro para uso deste sistema, por favor, desconsidere este e-mail. + +Para efetivar agora mesmo seu cadastro no sistema, clique no link abaixo (ou copie e cole em seu navegador): + +[LINK] + +Sem mais, + +Equipe [NAME] + + + + [NAME] - Recadastro de Senha + +Olá [USER], + +Você está recebendo este e-mail pois solicitou a mudança de senha no [NAME]. + +Se você não fez nenhuma requisição de recadastramento de senha, por favor, desconsidere este e-mail. + +Para efetuar agora mesmo a escolha de sua nova senha, clique no link abaixo (ou copie e cole em seu navegador): + +[LINK] + +Sem mais, + +Equipe [NAME] + + \ No newline at end of file diff --git a/configure/security.xml b/configure/security.xml index 388cc0f..acfdc11 100644 --- a/configure/security.xml +++ b/configure/security.xml @@ -1,11 +1,11 @@ - - - + + + \ No newline at end of file diff --git a/configure/shopping.xml b/configure/shopping.xml index 1c0a220..153a7a9 100644 --- a/configure/shopping.xml +++ b/configure/shopping.xml @@ -1,19 +1,19 @@ - - - - - + + + + + \ No newline at end of file diff --git a/configure/social.xml b/configure/social.xml index f17029d..d0674f3 100644 --- a/configure/social.xml +++ b/configure/social.xml @@ -1,42 +1,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/configure/titan.xml b/configure/titan.xml index 86c370e..16934b7 100644 --- a/configure/titan.xml +++ b/configure/titan.xml @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configure/tool.xml b/configure/tool.xml index 9984fba..bf1bc11 100644 --- a/configure/tool.xml +++ b/configure/tool.xml @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/configure/type.xml b/configure/type.xml index bc17bd4..e21edb0 100644 --- a/configure/type.xml +++ b/configure/type.xml @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/update/VERSION b/update/VERSION index 9c0db76..db2f56f 100644 --- a/update/VERSION +++ b/update/VERSION @@ -1 +1 @@ -1.14.09 \ No newline at end of file +1.21.10 \ No newline at end of file diff --git a/update/db/00000000000000.sql b/update/db/20161001100001.sql similarity index 100% rename from update/db/00000000000000.sql rename to update/db/20161001100001.sql diff --git a/update/db/20161004095701.sql b/update/db/20161001100002.sql similarity index 100% rename from update/db/20161004095701.sql rename to update/db/20161001100002.sql