-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Autenticação - Tela inicial do site
- Loading branch information
Showing
400 changed files
with
63,717 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM ambientum/php:7.2-nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false | ||
|
||
# following the PSR-2 (https://www.php-fig.org/psr/psr-2/) | ||
[*.php] | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[HOST] | ||
DOCKER_HOST_MYSQL=3306 | ||
DOCKER_HOST_APP=8080 | ||
|
||
# < symfony/framework-bundle | ||
# This file is a "template" of which env vars need to be defined for your application | ||
# Copy this file to .env file for development, create environment variables when deploying to production | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
[APP] | ||
APP_ENV=dev | ||
APP_SECRET=4c76783d415f7296ea1b4150cde3bf64 | ||
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2 | ||
#TRUSTED_HOSTS=localhost,example.com | ||
# </ symfony/framework-bundle | ||
|
||
# < symfony/swiftmailer-bundle | ||
[MAILER] | ||
# For Gmail as a transport, use: "gmail://username:password@localhost" | ||
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" | ||
# Delivery is disabled by default via "null://localhost" | ||
MAILER_URL=null://localhost | ||
# </ symfony/swiftmailer-bundle | ||
|
||
# < doctrine/doctrine-bundle > | ||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" | ||
# Configure your db driver and server_version in config/packages/doctrine.yaml | ||
[MySQL] | ||
# @warning [DATABASE_HOST] | ||
# @see /docker-compose.yml | ||
# used as container_name | ||
DATABASE_HOST=phpcomrapadura-mysql | ||
# @readonly [DATABASE_PORT] | ||
# [exposed by image](https://github.com/docker-library/mysql/blob/fc3e856313423dc2d6a8d74cfd6b678582090fc7/5.7/Dockerfile#L77) | ||
DATABASE_PORT=3306 | ||
|
||
DATABASE_DATABASE=phpcomrapadura | ||
DATABASE_USER=cababom | ||
DATABASE_PASSWORD=secret | ||
DATABASE_URL=mysql://cababom:secret@phpcomrapadura-mysql:3306/phpcomrapadura | ||
# </ doctrine/doctrine-bundle > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,52 @@ | ||
# Cache and logs (Symfony2) | ||
/app/cache/* | ||
/app/logs/* | ||
!app/cache/.gitkeep | ||
!app/logs/.gitkeep | ||
|
||
# Email spool folder | ||
/app/spool/* | ||
|
||
# Cache, session files and logs (Symfony3) | ||
/var/cache/* | ||
/var/logs/* | ||
/var/sessions/* | ||
!var/cache/.gitkeep | ||
!var/logs/.gitkeep | ||
!var/sessions/.gitkeep | ||
|
||
# Parameters | ||
/app/config/parameters.yml | ||
/app/config/parameters.ini | ||
|
||
# Managed by Composer | ||
/app/bootstrap.php.cache | ||
/var/bootstrap.php.cache | ||
/bin/* | ||
!bin/console | ||
!bin/symfony_requirements | ||
###> symfony/framework-bundle ### | ||
/.env | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
# Assets and user uploads | ||
/web/bundles/ | ||
/web/uploads/ | ||
###> symfony/webpack-encore-pack ### | ||
/node_modules/ | ||
/public/build/ | ||
npm-debug.log | ||
yarn-error.log | ||
###< symfony/webpack-encore-pack ### | ||
|
||
# PHPUnit | ||
/app/phpunit.xml | ||
###> symfony/web-server-bundle ### | ||
/.web-server-pid | ||
###< symfony/web-server-bundle ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
|
||
# Build data | ||
/build/ | ||
# phpstorm project files | ||
.idea | ||
|
||
# Composer PHAR | ||
/composer.phar | ||
# netbeans project files | ||
nbproject | ||
|
||
# Backup entities generated with doctrine:generate:entities command | ||
**/Entity/*~ | ||
# zend studio for eclipse project files | ||
.buildpath | ||
.project | ||
.settings | ||
|
||
# Embedded web-server pid file | ||
/.web-server-pid | ||
# windows thumbnail cache | ||
Thumbs.db | ||
|
||
# composer itself is not needed | ||
composer.phar | ||
/docker-compose.yml | ||
|
||
# Mac DS_Store Files | ||
.DS_Store | ||
|
||
# phpunit itself is not needed | ||
phpunit.phar | ||
|
||
tests/_output/* | ||
tests/_support/_generated | ||
|
||
#vagrant folder | ||
/.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# PHP com Rapadura - Novo Portal da Comunidade | ||
|
||
## Como rodar o projeto? | ||
|
||
#### Pré-Requisitos | ||
- [docker](https://docs.docker.com/install/) | ||
- [docker-compose](https://docs.docker.com/compose/install/) | ||
|
||
Para preparar o projeto para rodar rode os comandos abaixo: | ||
``` | ||
$ cp .env.dist .env | ||
$ cp docker-compose.yml.dist docker-compose.yml | ||
``` | ||
Estas instruções criarão cópias dos arquivos de configuração do projeto e do docker. | ||
Os dois arquivos vêm com configurações padrão funcionais para usar em sistemas operacionais que não tenham outros serviços. | ||
Se precisar edite-os de forma a ficarem compatíveis com alguma peculiaridade do seu sistema operacional. | ||
|
||
Para dar start no projeto é só entrar no **diretório root** do projeto executar o seguinte comando: | ||
``` | ||
$ docker-compose up -d | ||
``` | ||
|
||
Para instalar as dependências pode usar o comando: | ||
``` | ||
$ docker exec phpcomrapadura-app composer install | ||
``` | ||
|
||
Se quiser parar a execução do projeto é só rodar o seguinte comando: | ||
``` | ||
$ docker-compose stop | ||
``` | ||
|
||
Caso queria finalizar os serviços é só rodar o seguinte comando. Isso irá remover e parar os serviços/containers: | ||
``` | ||
$ docker-compose down | ||
``` | ||
|
||
> Segue duas **playlists** no **Youtube**, se você precisa se ambientar com o Docker. Uma do [**PHP da Zona da Mata**](https://www.youtube.com/playlist?list=PLMpauGt6IneQxS46vhASvVh7wGLmMRuXO), a segunda é do cara lá da [**Linux Tips**](https://www.youtube.com/playlist?list=PLf-O3X2-mxDk1MnJsejJwqcrDC5kDtXEb). E pra quem usa School of Net tem esse minicurso [Iniciando com Docker](https://www.schoolofnet.com/curso-iniciando-com-docker-rev2/). | ||
## Versionando o projeto | ||
|
||
Foi acordado de adotar a [**metodologia do git-flow**](https://danielkummer.github.io/git-flow-cheatsheet/index.pt_BR.html) para ajudar a [**versionar o projeto semanticamente**](https://semver.org/lang/pt-BR/). Sempre que houver uma dúvida quanto à isto. Sinta se à vontade para abrir uma [**issue**](https://github.com/PHPcomRapadura/site-principal/issues). Foi adicionado um pequeno resumo aqui no projeto. [[leia]](/docs/GITFLOW.md) | ||
|
||
## Convenções para Banco de Dados | ||
|
||
Deverá ser utilizado [**este guia**](/docs/DATABASE.md) como base para nomenclaturas de tabelas, colunas, chaves estrangeiras e outros quesitos de banco de dados. Pode ser que haja algumas exceções, mas que as exceções sejam tratadas como **exceções**! |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use App\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Debug\Debug; | ||
use Symfony\Component\Dotenv\Dotenv; | ||
|
||
set_time_limit(0); | ||
|
||
require __DIR__.'/../vendor/autoload.php'; | ||
|
||
if (!class_exists(Application::class)) { | ||
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.'); | ||
} | ||
|
||
if (!isset($_SERVER['APP_ENV'])) { | ||
if (!class_exists(Dotenv::class)) { | ||
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); | ||
} | ||
(new Dotenv())->load(__DIR__.'/../.env'); | ||
} | ||
|
||
$input = new ArgvInput(); | ||
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); | ||
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); | ||
|
||
if ($debug) { | ||
umask(0000); | ||
|
||
if (class_exists(Debug::class)) { | ||
Debug::enable(); | ||
} | ||
} | ||
|
||
$kernel = new Kernel($env, $debug); | ||
$application = new Application($kernel); | ||
$application->run($input); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) { | ||
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; | ||
exit(1); | ||
} | ||
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) { | ||
putenv('SYMFONY_PHPUNIT_REMOVE='); | ||
} | ||
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) { | ||
putenv('SYMFONY_PHPUNIT_VERSION=6.5'); | ||
} | ||
if (false === getenv('SYMFONY_PHPUNIT_DIR')) { | ||
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit'); | ||
} | ||
|
||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"name": "PHP com Rapadura", | ||
"description": "O site da comunidade mais porreta que tem", | ||
"type": "project", | ||
"license": "MIT", | ||
"require": { | ||
"php": "^7.1.3", | ||
"ext-iconv": "*", | ||
"doctrine/doctrine-fixtures-bundle": "^3.0", | ||
"gedmo/doctrine-extensions": "^2.4", | ||
"sensio/framework-extra-bundle": "^5.1", | ||
"symfony/asset": "^4.1", | ||
"symfony/console": "^4.1", | ||
"symfony/expression-language": "^4.1", | ||
"symfony/flex": "^1.0", | ||
"symfony/form": "^4.1", | ||
"symfony/framework-bundle": "^4.1", | ||
"symfony/lts": "^4@dev", | ||
"symfony/monolog-bundle": "^3.1", | ||
"symfony/orm-pack": "*", | ||
"symfony/process": "^4.1", | ||
"symfony/security-bundle": "^4.1", | ||
"symfony/serializer-pack": "*", | ||
"symfony/swiftmailer-bundle": "^3.1", | ||
"symfony/twig-bundle": "^4.1", | ||
"symfony/validator": "^4.1", | ||
"symfony/web-link": "^4.1", | ||
"symfony/webpack-encore-pack": "*", | ||
"symfony/yaml": "^4.1" | ||
}, | ||
"require-dev": { | ||
"symfony/debug-pack": "*", | ||
"symfony/dotenv": "^4.1", | ||
"symfony/maker-bundle": "^1.0", | ||
"symfony/profiler-pack": "*", | ||
"symfony/test-pack": "^1.0", | ||
"symfony/web-server-bundle": "^4.1" | ||
}, | ||
"config": { | ||
"preferred-install": { | ||
"*": "dist" | ||
}, | ||
"sort-packages": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"App\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"App\\Tests\\": "tests/" | ||
} | ||
}, | ||
"replace": { | ||
"symfony/polyfill-iconv": "*", | ||
"symfony/polyfill-php71": "*", | ||
"symfony/polyfill-php70": "*", | ||
"symfony/polyfill-php56": "*" | ||
}, | ||
"scripts": { | ||
"auto-scripts": { | ||
"cache:clear": "symfony-cmd", | ||
"assets:install %PUBLIC_DIR%": "symfony-cmd" | ||
}, | ||
"post-install-cmd": [ | ||
"@auto-scripts" | ||
], | ||
"post-update-cmd": [ | ||
"@auto-scripts" | ||
] | ||
}, | ||
"conflict": { | ||
"symfony/symfony": "*" | ||
}, | ||
"extra": { | ||
"symfony": { | ||
"allow-contrib": false | ||
} | ||
} | ||
} |
Oops, something went wrong.