bolt / project
Bolt 5 standard project skeleton
Fund package maintenance!
bobdenotter
Installs: 25 697
Dependents: 0
Suggesters: 0
Security: 0
Stars: 40
Watchers: 11
Forks: 36
Open Issues: 17
Type:project
Requires
- php: ^8.0
- bobdenotter/configuration-notices: ^1.4
- bobdenotter/weatherwidget: ^1.1
- bolt/article: ^2.1
- bolt/assets: ^5.2
- bolt/core: ^5.2
- bolt/newswidget: ^1.3
- bolt/redactor: ^2.1
- bolt/themes: ^3.5
- nelmio/security-bundle: ^2.12
- symfony/flex: ^2.2
Requires (Dev)
- phpstan/phpstan: ^0.12.48
- phpstan/phpstan-doctrine: ^0.12.20
- phpstan/phpstan-symfony: ^0.12.8
- symplify/easy-coding-standard: ^9.4
Replaces
- dev-master
- 2.5.0-beta.5
- 2.5.0-beta.4
- 2.5.0-beta.3
- 2.5.0-beta.2
- 2.5.0-beta.1
- 2.4.0-beta.5
- 2.4.0-beta.4
- 2.4.0-beta.3
- 2.4.0-beta.2
- 2.3.20
- 2.3.19
- 2.3.18
- 2.3.17
- 2.3.14
- 2.3.13
- 2.3.12
- 2.3.11
- 2.3.10
- 2.3.9
- 2.3.7
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.20
- 2.2.19
- 2.2.18
- 2.2.17
- 2.2.14
- 2.2.12
- 2.2.11
- 2.2.10
- 2.2.9
- 2.2.7
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.2.0-beta.1
- 2.1.7
- 2.1.6.3
- 2.1.6.2
- 2.1.6.1
- 2.1.6
- 2.1.5.1
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.0
- 2.1.0-rc.1
- 2.1.0-beta.14
- 2.1.0-beta.13
- 2.1.0-beta.10
- 2.0.7
- 2.0.6.1
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.1
- 2.0.0
- 2.0.0-rc.2
- 2.0.0-rc.1
- 2.0.0-beta.14
- 2.0.0-beta.13
- 2.0.0-beta.10
- 2.0.0-beta.3
- 2.0.0-beta.2
- 2.0.0-beta.1.1
- 2.0.0-beta.1
- 1.4.x-dev
- 1.4.2
- 1.4.1
- 1.4.0
- 1.4.0-beta.14
- 1.4.0-beta.11
- 1.4.0-beta.10
- 1.4.0-beta.9
- 1.4.0-beta.8
- 1.4.0-beta.7
- 1.4.0-beta.6
- 1.4.0-beta.5
- 1.4.0-beta.4
- 1.4.0-beta.3
- 1.4.0-beta.2
- 1.4.0-beta.1
- 1.3.x-dev
- 1.3.34
- 1.3.33
- 1.3.32
- 1.3.31
- 1.3.30
- 1.3.29
- 1.3.28
- 1.3.27
- 1.3.25
- 1.3.24
- 1.3.23
- 1.3.22
- 1.3.21
- 1.3.20
- 1.3.19
- 1.3.18
- 1.3.17
- 1.3.16
- 1.3.15
- 1.3.14
- 1.3.13
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.63
- 1.0.62
- 1.0.61
- 1.0.60
- 1.0.59
- 1.0.58
- 1.0.57
- 1.0.56
- 1.0.55
- 1.0.54
- 1.0.53
- 1.0.52
- 1.0.51
- 1.0.50
- 1.0.48
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-5.2-php-8
- dev-5.2-php7
- dev-dependabot/composer/guzzlehttp/psr7-2.5.0
- dev-dependabot/composer/api-platform/core-2.7.10
- dev-dependabot/composer/symfony/http-kernel-5.4.20
- dev-php8
- dev-fix/missing-gitkeep
- dev-bobdenotter-patch-1
This package is auto-updated.
Last update: 2024-10-22 11:26:49 UTC
README
Bolt CMS is an open source, adaptable platform for building and running modern websites. Built on PHP, Symfony and more. Read the site for more info.
To check out Bolt and set up your first Bolt installation, read Installing Bolt 5.
Installing Bolt CMS
with Composer
Note: Installing with composer and running the site on your local machine using the method described below is the preferred method of the Bolt core development team.
You can set up a new Bolt 5 project, using the following command, replacing myprojectname
with your desired project's name.
composer create-project bolt/project myprojectname
Navigate into the newly created folder, and configure the database in .env
(The configuration is intended to work with the database SQLite).
# Configure database for doctrine/doctrine-bundle # SQLite (note: _three_ slashes) DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/bolt.sqlite # MYSQL / MariaDB #DATABASE_URL=mysql://db_user:"db_password"@127.0.0.1:3306/db_name?serverVersion=5.7 # Postgres #DATABASE_URL=postgresql://db_user:"db_password"@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8
Set up the database, create the first user and add fixtures (dummy content):
bin/console doctrine:database:create # Create database bin/console doctrine:schema:create # Create schema in database bin/console doctrine:fixtures:load --no-interaction # Load fixtures in databse (step not compulsory) bin/console bolt:add-user --admin # Follow the creation steps in the console (warning: fixtures already created an admin user) composer run post-create-project-cmd # Duplicate themes in the appropriate folder bin/console bolt:info # Verify Bolt installation
Run Bolt using the built-in webserver, Symfony CLI or your own preferred webserver:
bin/console server:start
or…
symfony server:start -d symfony open:local
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.
Note: If you don't want to use Docker, don't forget to remove what isn't necessary:
- remove.dockerignore
file
- removedocker-composer.yml
file
- removeDockerfile
file
- removedocker
folder
with Docker
Disclaimer: Docker is not used by the Bolt core development team. Bolt can be run using docker, but you are advised to only attempt this if you have enough experience with Docker yourself to understand what is going on in the Dockerfile
and in docker-compose.yml
. The included setup might not be a good fit for your Dockerized setup. When in doubt, follow general advice on running Symfony projects in docker, as Bolt is built using Symfony. The Bolt team doesn't provide pre-built containers.
Start by downloading the Bolt project distribution .tar.gz
file, or generate a GitHub repository from the template we provide.
Once you have extracted its content, the resulting directory contains the Bolt project structure. You will add your own code and configuration inside it.
Note: Try to avoid using the .zip
file, as it may cause potential permission issues.
Bolt is shipped with a Docker setup that makes it easy to get a containerized development environment up and running. If you do not already have Docker on your computer, it's the right time to install it.
On Mac, only Docker for Mac is supported. Similarly, on Windows, only Docker for Windows is supported. Docker Machine is not supported out of the box.
Open a terminal, and navigate to the directory containing your project skeleton.
Navigate into the newly created folder, and configure environment variables in the .env
file for Docker & the database MySQL version 5.7.
###> symfony/framework-bundle ### APP_ENV=dev APP_DEBUG=1 APP_SECRET=!ChangeMe! TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 TRUSTED_HOSTS='^(localhost|nginx)$' ###< symfony/framework-bundle ### ###> doctrine/doctrine-bundle ### DATABASE_URL=mysql://bolt:!ChangeMe!@db:3306/bolt?serverVersion=5.7 ###< doctrine/doctrine-bundle ### ###> symfony/mailer ### MAILER_DSN=smtp://mailcatcher:1025 ###< symfony/mailer ###
Run the following command to start all services using Docker Compose:
docker-compose up -d # Running in detached mode docker-compose exec php bin/console doctrine:schema:create # Create schema in database docker-compose exec php bin/console doctrine:fixtures:load --no-interaction # Load fixtures in databse (step not compulsory) docker-compose exec php bin/console bolt:add-user --admin # Follow the creation steps in the console (warning: fixtures already created an admin user)
This starts the following services:
To see the status of the containers, run:
docker-compose ps
To execute commands in a container, run:
docker-compose exec <container name> <command> docker-compose exec php sh # To enter the container directly, you will be placed at the root of the project docker-compose exec php bin/console bolt:add-user # Follow the creation steps in the console (warning: fixtures already created an admin user)
To see the container's logs, run:
docker-compose logs # Display the logs of all containers docker-compose logs -f # Same but follow the logs docker-compose logs -f php # Follow the logs for one container
Finally, open the new installation in a browser. If you've used one of the commands above, you'll find the frontpage at http://localhost:8080/ or https://localhost:8443/
The Bolt admin panel can be found at http://localhost:8080/bolt or https://localhost:8443/bolt
The tests
Static analysis
The ecs.php
configuration file is located at the root of the cms project
# With Composer composer lint # Launch ECS in dry run mode (command to launch in a Continuous Integration) composer lint:fix # Launch ECS in fix mode # With Docker docker-compose exec php composer lint # Launch ECS by the php container
The phpstan.neon
configuration file is located at the root of the cms project
# With Composer composer phpstan # Launch PHPStan (command to launch in a Continuous Integration) # With Docker docker-compose exec php composer phpstan # Launch PHPStan by the php container
Contributing
If you'd like to contribute, please check Bolt's core repository and read the "Contributing to Bolt" documentation page.