-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit db4fe78
Showing
443 changed files
with
17,142 additions
and
0 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,49 @@ | ||
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file | ||
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_DEBUG=1 | ||
APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629 | ||
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2 | ||
#TRUSTED_HOSTS='^localhost|example\.com$' | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
|
||
# uncomment the appropiate line(s) below to set the database using a DSN (data source name) | ||
# Replace `db_user`, `db_password` and `db_name` where needed. Depending on your server settings, | ||
# you might also need to configure the host ("localhost" / "127.0.0.1") or the port number ("3306") | ||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
|
||
# SQLite (note: _three_ slashes) | ||
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite | ||
|
||
# MYSQL / MariaDB | ||
#DATABASE_URL=mysql://db_user:"db_password"@localhost:3306/db_name | ||
|
||
# Postgres | ||
#DATABASE_URL=postgresql://db_user:"db_password"@localhost:5432/db_name?serverVersion=11" | ||
|
||
# MYSQL / MariaDB (additional settings, needed for Docker) | ||
#DATABASE_USER=db_user | ||
#DATABASE_PASSWORD=db_password | ||
#DATABASE_NAME=db_name | ||
|
||
###< doctrine/doctrine-bundle ### | ||
|
||
###> symfony/mailer ### | ||
# MAILER_DSN=smtp://localhost | ||
###< symfony/mailer ### | ||
|
||
###> nelmio/cors-bundle ### | ||
CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$ | ||
###< nelmio/cors-bundle ### | ||
|
||
# blackfire access tokens for performance measurement | ||
BLACKFIRE_CLIENT_ID= | ||
BLACKFIRE_CLIENT_TOKEN= | ||
BLACKFIRE_SERVER_ID= | ||
BLACKFIRE_SERVER_TOKEN= | ||
BLACKFIRE_LOG_LEVEL=0 |
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,72 @@ | ||
composer.phar | ||
config/bolt/*_local.yaml | ||
|
||
### Uploads ### | ||
/public/files/* | ||
|
||
### NPM and frontend assets building cruft | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
### File-system cruft and temporary files | ||
__* | ||
._* | ||
.*.swp | ||
.swp | ||
*.lock | ||
!composer.lock | ||
!symfony.lock | ||
*lock.json | ||
!/package-lock.json | ||
.buildpath | ||
|
||
### Platfom-specific files | ||
.DS_Store | ||
thumbs.db | ||
Vagrantfile | ||
.vagrant* | ||
.idea | ||
.vscode/* | ||
appveyor.yml | ||
|
||
### temp files | ||
/var/cache/* | ||
!/var/cache/.gitkeep | ||
/var/log/* | ||
!/var/log/.gitkeep | ||
!/var/log/e2e-reports/performance/.gitkeep | ||
!/var/log/e2e-reports/report/.gitkeep | ||
!/var/log/behat-reports/.gitkeep | ||
/var/data/* | ||
!/var/data/.gitkeep | ||
/var/sessions/* | ||
!/var/sessions/.gitkeep | ||
|
||
###Local config | ||
/config/packages/local | ||
/config/routes/local | ||
|
||
###> symfony/framework-bundle ### | ||
/.env | ||
/public/bundles/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
###> symfony/web-server-bundle ### | ||
/.web-server-pid | ||
###< symfony/web-server-bundle ### | ||
|
||
###> friendsofphp/php-cs-fixer ### | ||
/.php_cs | ||
/.php_cs.cache | ||
###< friendsofphp/php-cs-fixer ### | ||
|
||
###> squizlabs/php_codesniffer ### | ||
/.phpcs-cache | ||
/phpcs.xml | ||
###< squizlabs/php_codesniffer ### | ||
|
||
###> phpunit/phpunit ### | ||
/phpunit.xml | ||
###< phpunit/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,19 @@ | ||
Copyright (c) 2015-2020 Bob den Otter | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,183 @@ | ||
DC_RUN ?= docker-compose run --rm | ||
|
||
.PHONY: help install build-assets copy-assets server server-stop cache csclear cscheck csfix csfix-tests stancheck test \ | ||
behat e2e full-test db-create db-update db-reset docker-install docker-install-deps docker-start docker-assets-serve \ | ||
docker-update docker-cache docker-csclear docker-cscheck docker-csfix docker-stancheck docker-db-create docker-db-reset \ | ||
docker-db-update docker-npm-fix-env docker-test docker-server-stop docker-behat docker-behat-rerun docker-full-test \ | ||
docker-command docker-console | ||
|
||
default: help | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | sort | awk '{split($$0, a, ":"); printf "\033[36m%-30s\033[0m %-30s %s\n", a[1], a[2], a[3]}' | ||
|
||
install: ## to install all project | ||
cp -n .env.dist .env || true | ||
composer install | ||
make db-create | ||
|
||
build-assets: ## to install assets | ||
cd vendor/bolt/core && npm install && npm run build | ||
rm -rf public/assets | ||
cp -rf vendor/bolt/core/public/assets public/assets | ||
|
||
copy-assets: ## to install copy assets | ||
rm -rf ../assets/assets | ||
cp -rf vendor/bolt/core/public/assets ../assets/ | ||
|
||
server: ## to start server | ||
bin/console server:start 127.0.0.1:8088 || true | ||
|
||
server-stop: ## to stop server | ||
bin/console server:stop | ||
|
||
cache: ## to clean cache | ||
bin/console cache:clear | ||
|
||
csclear: ## to clean cache and check coding style | ||
mkdir -p var/cache/ecs | ||
chmod -R a+rw var/cache/ecs | ||
rm -rf var/cache/ecs/* | ||
|
||
cscheck: ## to check coding style | ||
make csclear | ||
vendor/bin/ecs check src | ||
make stancheck | ||
|
||
csfix: ## to fix coding style | ||
make csclear | ||
vendor/bin/ecs check src --fix | ||
make stancheck | ||
|
||
csfix-tests: ## to test with csfixer | ||
make csclear | ||
vendor/bin/ecs check tests/php --fix | ||
make stancheck | ||
|
||
stancheck: ## to run phpstan | ||
vendor/bin/phpstan --memory-limit=1G analyse -c phpstan.neon src | ||
|
||
test: ## to run phpunit tests | ||
vendor/bin/phpspec run | ||
vendor/bin/phpunit | ||
|
||
behat: ## to run behat tests | ||
make server | ||
vendor/bin/behat -v | ||
|
||
behat-rerun: ## to rerun behat tests | ||
make server | ||
vendor/bin/behat -v --rerun | ||
|
||
e2e: ## to run kakunin tests | ||
make server | ||
cd tests/e2e && npm run kakunin && cd ../.. | ||
|
||
full-test: ## to run full tests | ||
make cscheck | ||
make test | ||
npm test | ||
make behat | ||
make e2e | ||
|
||
db-create: ## to create database and load fixtures | ||
bin/console doctrine:database:create | ||
bin/console doctrine:schema:create | ||
bin/console doctrine:fixtures:load -n | ||
|
||
db-update: ## to update schema database | ||
bin/console doctrine:schema:update -v --dump-sql --force --complete | ||
|
||
db-reset: ## to delete database and load fixtures | ||
bin/console doctrine:schema:drop --force --full-database | ||
bin/console doctrine:schema:create | ||
bin/console doctrine:fixtures:load -n | ||
|
||
# Dockerized commands: | ||
docker-install: ## to install project with docker | ||
make docker-start | ||
make docker-install-deps | ||
make docker-db-create | ||
make docker-server | ||
|
||
docker-install-deps: ## to install all assets with docker | ||
docker-compose exec -T php sh -c "composer install" | ||
$(DC_RUN) node sh -c "make build-assets" | ||
$(DC_RUN) node sh -c "cd vendor/bolt/core && npm rebuild node-sass" | ||
|
||
docker-start: ## to build containers | ||
cp -n .env.dist .env || true | ||
docker-compose up -d | ||
|
||
docker-assets-serve: ## to run server with npm | ||
$(DC_RUN) node sh -c "npm run serve" | ||
|
||
docker-update: ## to update dependencies with docker | ||
docker-compose exec -T php sh -c "composer update" | ||
|
||
docker-cache: ## to clean cache with docker | ||
docker-compose exec -T php sh -c "bin/console cache:clear" | ||
|
||
docker-csclear: ## to clean cache and check coding style with docker | ||
docker-compose exec -T php sh -c "mkdir -p var/cache/ecs" | ||
docker-compose exec -T php sh -c "chmod -R a+rw var/cache/ecs" | ||
docker-compose exec -T php sh -c "rm -rf var/cache/ecs/*" | ||
|
||
docker-cscheck: ## to check coding style with docker | ||
make docker-csclear | ||
docker-compose exec -T php sh -c "vendor/bin/ecs check src" | ||
make docker-stancheck | ||
|
||
docker-csfix: ## to fix coding style with docker | ||
make docker-csclear | ||
docker-compose exec -T php sh -c "vendor/bin/ecs check src --fix" | ||
make docker-stancheck | ||
|
||
docker-stancheck: ## to run phpstane with docker | ||
docker-compose exec -T php sh -c "vendor/bin/phpstan analyse -c phpstan.neon src" | ||
|
||
docker-db-create: ## to create database and load fixtures with docker | ||
docker-compose exec -T php sh -c "bin/console doctrine:database:create" | ||
docker-compose exec -T php sh -c "bin/console doctrine:schema:create" | ||
docker-compose exec -T php sh -c "bin/console doctrine:fixtures:load -n" | ||
|
||
docker-db-reset: ## to delete database with docker | ||
docker-compose exec -T php sh -c "bin/console doctrine:schema:drop --force --full-database" | ||
docker-compose exec -T php sh -c "bin/console doctrine:schema:create" | ||
docker-compose exec -T php sh -c "bin/console doctrine:fixtures:load -n" | ||
|
||
docker-db-update: ## to update schema database with docker | ||
docker-compose exec -T php sh -c "bin/console doctrine:schema:update -v --dump-sql --force --complete" | ||
|
||
docker-npm-fix-env: ## to rebuild asset sass | ||
$(DC_RUN) node sh -c "npm rebuild node-sass" | ||
|
||
docker-test: ## to run phpspec and phpunit tests with docker | ||
docker-compose exec -T php sh -c "vendor/bin/phpspec run" | ||
docker-compose exec -T php sh -c "vendor/bin/phpunit" | ||
|
||
docker-server: ## to start server with docker | ||
docker-compose exec -T php bin/console server:start 127.0.0.1:8088 | ||
|
||
docker-server-stop: ## to stop server with docker | ||
docker-compose exec -T -u www-data php bin/console server:stop | ||
|
||
docker-behat: ## to run behat tests with docker | ||
docker-compose exec -T php vendor/bin/behat -v | ||
|
||
docker-behat-rerun: ## to rerun behat tests with docker | ||
docker-compose exec -T php vendor/bin/behat -v --rerun | ||
|
||
docker-full-test: ## to run all test with docker | ||
make docker-cache | ||
make docker-cscheck | ||
make docker-test | ||
npm test | ||
make docker-behat | ||
make e2e | ||
|
||
docker-command: ## to run commmand shell in php container | ||
docker-compose exec -T php sh -c "$(c)" | ||
|
||
docker-console: ## to run commmand with console symfony in php container | ||
docker-compose exec -T php sh -c "bin/console $(c)" |
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,62 @@ | ||
Bolt 4 standard project skeleton | ||
================================ | ||
|
||
Welcome! This is a Bolt 4 project, set up using `composer create-project`. If | ||
you are the developer of this project, you can modify this README to the | ||
specifics of your project. Below are the general instructions to set up a _new_ | ||
project, based off the same skeleton. | ||
|
||
|
||
Note: If you're updating from an earlier beta, read UPDATE.md for details. | ||
|
||
--- | ||
|
||
Set up a new Bolt 4 project, using the following command, replacing | ||
`myprojectname` with your desired project's name. | ||
|
||
```bash | ||
composer create-project bolt/project myprojectname | ||
``` | ||
|
||
Navigate into the newly created folder, and configure the database in `.env`. | ||
You can skip this step, if you'd like to use SQLite. | ||
|
||
```dotenv | ||
# SQLite | ||
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite | ||
# MySQL | ||
DATABASE_URL=mysql://root:"root%1"@127.0.0.1:3306/four | ||
``` | ||
|
||
Set up the database, create the first user and add fixtures (dummy content): | ||
|
||
```bash | ||
bin/console bolt:setup | ||
``` | ||
|
||
Run Bolt using the built-in webserver, Symfony CLI, Docker or your own | ||
preferred webserver: | ||
|
||
```bash | ||
bin/console server:start | ||
``` | ||
|
||
or… | ||
|
||
```bash | ||
symfony server:start -d | ||
symfony open:local | ||
``` | ||
|
||
or… | ||
|
||
```bash | ||
make docker-install | ||
``` | ||
|
||
Finally, open the new installation in a browser. If you've used one of the | ||
commands above, you'll find the frontpage at http://127.0.0.1:8000/ \ | ||
The Bolt admin panel can be found at http://127.0.0.1:8000/bolt | ||
|
||
Log in using the credentials you created when setting up the first user. |
Oops, something went wrong.