Giter Site home page Giter Site logo

bolt / project Goto Github PK

View Code? Open in Web Editor NEW
38.0 11.0 38.0 4.5 MB

πŸš€ Repo to `composer create project` a Bolt 5 project.

License: MIT License

PHP 66.31% Makefile 6.38% Shell 7.92% Dockerfile 19.39%
hacktoberfest symfony php composer-project composer

project's Introduction

Bolt 5 standard project skeleton

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
- remove docker-composer.yml file
- remove Dockerfile file
- remove docker 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:

Name Description Port(s) Environment(s)
db A MySQL 5.7 database server 3306 all (prefer using a managed service in prod)
php The Bolt project with PHP, PHP-FPM 7.4, Composer and sensitive configs n/a all
nginx The HTTP server for the Bolt project (NGINX) 8080 all
h2-proxy A HTTP/2 and HTTPS development proxy for all apps 8443 dev (configure properly your web server in prod)
mailcatcher MailCatcher runs a super simple SMTP server delivered with a web interface 1025 for smtp port
1080 for interface
only for dev
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.

project's People

Contributors

bobdenotter avatar brambaud avatar cv65kr avatar dependabot[bot] avatar eduardomart avatar evertalbers avatar fabienchaillou avatar flug avatar garrettboone avatar i-valchev avatar iamgoodbytes avatar mcdennem avatar postal avatar simongroenewolt avatar toofff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project's Issues

Strange installation issues, possibly related to odd installation path?

(Not sure if this has to do with me using ( and ) in paths or if it's something else.)

Ubuntu 20.04.LTS.

Issuing this: "php composer.phar create-project bolt/project Zap"

Getting this:

Installing bolt/project (2.2.7)

There's a notice: "Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead."

And then, after doing some init work, I get this:

Installing Bolt themes as hard copies.

Theme Method / Error
✘ base-2021 Failed to remove directory "/sites/The_(very)Special_Site/Zap/public/theme/..Uu9": rmdir(/sites/The(very)_Special_Site/Zap/public/theme/..Uu9): Text file busy
βœ” base-2018 copied
βœ” skeleton copied

[ERROR] Some errors occurred while installing themes.

In BaseNode.php line 469:
Invalid configuration for path "translation.configs.site.dirs.0": The directory "/sites/The_(very)_Special_Site/Zap/public/theme/base-2021" does not exist.

In Configuration.php line 131:
The directory "/sites/The_(very)_Special_Site/Zap/public/theme/base-2021" does not exist.

2022-05-24T10:58:10+02:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension()" might add "?ExtensionInterface" as a native return type declaration in the future. Do the same in child class "BabDev\PagerfantaBundle\BabDevPagerfantaBundle" now to avoid errors or add an explicit @return annotation to suppress this message.

Error when creating project

$ composer create-project bolt/project bolt4

---- redacted... package installation went well ----

Executing script cache:clear --no-warmup [KO]
 [KO]
Script cache:clear --no-warmup returned with error code 1
!!  
!!  In AbstractMySQLDriver.php line 110:
!!                                                                                 
!!    An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for u  
!!    ser 'root'@'localhost'                                                       
!!                                                                                 
!!  
!!  In PDOConnection.php line 31:
!!                                                                      
!!    SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  
!!                                                                      
!!  
!!  In PDOConnection.php line 27:
!!                                                                      
!!    SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  
!!                                                                      
!!  
!!  cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
!!  
!!  
Script @auto-scripts was called via post-install-cmd

The installer shouldn't be trying to clear cache / connect to database before proper db credentials are setup. (Trying to use root user as default isn't the best idea either).

Symbolic link does not work in docker

Hi @toofff,
Following the discussion on the slack with this change from composer.json
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd" => "assets:install %PUBLIC_DIR%": "symfony-cmd"
everything is ok, so it looks like it can't be used "--symlink --relative" for symfony assets

Thanks @toofff for help

Flaky external service causes problems during project setup.

Running bin/console bolt:setup and choosing to yes for Add fixtures (dummy content) to the Database? (yes/no) I ended up with error

In ResponseTrait.php line 280:
                                                                                                                        
  HTTP/1.1 503 Service Unavailable returned for "https://source.unsplash.com/1280x1024/?portrait,face,headshot/23227".  
                                                                                                                        

The service seems down and that URL is inaccessible. I guess some better error handling or falling back to another service is required to mitigate this scenario.

Circular reference detected

Issue

This error occurs after starting the server in Bolt 5

In CheckCircularReferencesPass.php line 67:

  Circular reference detected for service "Bolt\Menu\StopwatchBackendMenuBuilder", path: "Bolt\Menu\StopwatchBackendMenuBuilder
   -> Bolt\Menu\BackendMenu -> Bolt\Menu\StopwatchBackendMenuBuilder".

Environment

  • PHP 8.2.6
  • Bolt 5

Unavailable dependency `bobdenotter/commando`

Hello, I'm trying to update the dependencies of the project but the package bobdenotter/yaml-migrations:1.2.0 has a dependency on an unavailable package bobdenotter/commando. Downgrading to bobdenotter/yaml-migrations:1.1.2 fix the problem for the moment.

Will bobdenotter/commando be up again ?

Deprecations

Deprecations will be fixed? =)
User Deprecated: The "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service is deprecated since Symfony 4.3. Use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead.
The "Symfony\Component\Config\Definition\Builder\TreeBuilder::root()" method called for the "stof_doctrine_extensions" configuration is deprecated since Symfony 4.3, pass the root name to the constructor instead.
and 61 other

Fatal error, directory public does not exist

After uploading the website to the server, Bolt does not handle the public folder properly which was "public" on the local machine and is "public_html" on the server. clearing cache makes no difference. What am I looking at?

Backend fatal error: PHP Fatal error: Uncaught Exception: The directory "/home//domains/website.com/public/theme/ThemeName" does not exist. in /home//domains/website.com/vendor/php-translation/symfony-bundle/DependencyInjection/Configuration.php:131\nStack trace:\n#0 /home//domains/website.com/vendor/symfony/config/Definition/Builder/ExprBuilder.php(239): Translation\Bundle\DependencyInjection\Configuration->Translation\Bundle\DependencyInjection\{closure}('/home/...')\n#1 /home//domains/website.com/vendor/symfony/config/Definition/BaseNode.php(461): Symfony\Component\Config\Definition\Builder\ExprBuilder::Symfony\Component\Config\Definition\Builder\{closure}('/home/...')\n#2 /home//domains/website.com/vendor/symfony/config/Definition/PrototypedArrayNode.php(177): Symfony\Component\Config\Definition\BaseNode->finalize('/home/...')\n#3 /home//domains/website.com/vendor/symfony/config/Definition/BaseNo in /home//domains/website.com/vendor/symfony/config/Definition/BaseNode.php on line 469\n

Clone, up and got .sh error...

after run "docker-compose up -d" I've got error:
image

Why? Why you build php container via .sh script which is not work correctly?!
And how I can fix it?

When installing bolt through composer the folder public/theme/base-2021 is missing

When instaling bolt through composer composer create-project bolt/project myprojectname the mentioned folder public/theme/base-2021 isn't created hence all post-install cmd fails:

sh: 1: exec: php bin/console cache:clear --no-warmup --ansi: not found sh: 1: exec: php bin/console assets:install --symlink --relative public --ansi: not found sh: 1: exec: php bin/console bolt:copy-assets --ansi: not found sh: 1: exec: php bin/console extensions:configure --with-config --ansi: not found sh: 1: exec: php bin/console bolt:info --tablesInitialised: not found

Creating the folder manually and running the tasks solve the problem for me

Details

Question Answer
Relevant Bolt Version 5.0.5
Install type composer (Composer 2.0.9 2021-01-27 16:09:27)
PHP version PHP 8.0.8 (cli) (built: Sep 11 2021 04:17:39) ( NTS )
OS Kubuntu 21.10

Adding full phpinfo here so you can see full configuration

phpinfo.txt

[RFC] Docker Questions / Optimization

Hello Boltheads and Docker Friends,

i was using Bolt via composer setup in the past but in the last couple of years changed to completely dockerized servers. There are a couple of things about the current Docker setup for bolt that i feel could be optimized or should be changed.

I know that there are lot of use cases for docker setups, and unlike mentioned in the Bolt documentation, running a production site via Docker is not only possible but could be a very quick and handy way to setup Bolt-powered websites. Discussions about Docker can quickly become dogmatic, since there are many people that have pretty strong objections against it - while most of them never actually tried using docker containers, maybe those people could refrain from participating in the discussion.

i think its good if we could assume that docker containers CAN run production websites, because this is done a lot. even by very big companies. VPS servers and other cloud computing platforms that run Docker containers are becoming cheaper every year, so the classical "managed host with php" scenario may become less and less in thu future.

The last days i spend understanding the existing Bolt Docker setup, going through the Dockerfiles etc. My biggest ciriticism would be the lack of documentation and the complexity in which things are organized. Then and there are some things that i don't understand or don't think are very efficient:

  • The Container configures a NGinx to serve the static files and proxy PHP-FPM. But then the docker-compose.yml stack sets up ANOTHER NGinx proxy server in front of the other NGinx, just for SSL and http2. Maybe there is something i dont understand about this approach. i think it would be fairly easy to optionally setup the self signed cert and http2 for the existing Nginx, enabling & disabling options via the .env file. Personally i dont need either, since i have a central ssl offloading proxy server (HAProxy) for all my internet facing containers and i think this is what most people have. Would it no be enough to set up an unencrypted Nginx and make a note in the docs that people should look into a Proxy Servers and LetsEncrypt et al if they want to run this properly?

  • Minor thing, but why name the Bolt container "php", i guess it should be either "nginx-php-bolt" or similar or just bolt.

  • While i see the advantage of only having to clone the entire bolt/project directory from github, regardless of running the composer setup or via docker, there is a lot of "garbage" left over from this approach, which is simply not needed or used when running the docker.... i think it would be fair to argue for a seperate bolt/docker repo, which clones the required bolt/project files into the container during the built progress and not throws everyting together, duplicates it and leaves a big mess at the end.

  • i think a reasonably big share of bolt users might be OK with a SQLite based install for small project websites. or a quick tryout. the ones that need MariaDB / MySQL probably have a Database already running or know how to set one up. In any case it should be very easy and well documented how to switch between these two types of setup. This is not the case at the moment.

  • I guess the idea behind running a complete build process for everyone that wants to run the Bolt Docker is to optimize cross platform compatibility? I think this might be problematic for people running low spec servers (think RPi <=4)... There are other approaches, like automatic cross platfotm container builds using CI etc.. This is probably a lot of work to set up initially but then save EVERY user to go through the build process again.

  • Generally speaking, a more streamlined, simple and well documented approach Docker pre-built Container would encourage more people to give Bolt a try by just spinning it up quickly. With the level of complexity, the extra build steps and lack of documentation there is a risk that people just feel overwhelmed and give it a pass.

  • The default 2021 theme is built around tailwind.css which CAN be used as a complete CDN version, in which case its a hefty 3.3MB css file. But it really only makes sense if you run a build chain with postcss and compile it for YOUR use case. If Bolt stays with tailwind, the build chain (node.js / npm / postcss / autoprefixer / maybe nanocss) should be integrated in the Docker container as well, to make it usable as a complete starting point for building your sites. Either the build chain could be integrated into the nginx-php-bolt container or the docker-compose stack could bring in another container in the stack which takes care of that, similar to - https://hub.docker.com/r/hut6/postcss

Like i said, totally possible that i misunderstood a couple of the original ideas, in which case i would be happy if someone would enlighten me about what was intended.

Cheers,
T.

@toofff

php 8.2

Hi,
I've tried install bolt on php8.2 with no success.
It seems bolt lock with old laminas and it doesn't support php8.2.
Please fix it, thank!
23-10-21--08-47-58_maim

Composer update produces error: MetadataStorageError.php line 13

I installed Bolt via the project, and ran composer update.

Initial results:

Nothing to install, update or remove...
[OK] Cache for the "prod" environment (debug=false) was successfully cleared...
[OK] All assets were successfully installed...
[OK] All assets were successfully installed...

But then this error:

11:44:43 CRITICAL  [console] Error thrown while running command "doctrine:migrations:up-to-date --ansi". Message: "The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue." ["exception" => Doctrine\Migrations\Exception\MetadataStorageError^ { …},"command" => "doctrine:migrations:up-to-date --ansi","message" => "The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue."]

In MetadataStorageError.php line 13:

The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.

doctrine:migrations:up-to-date [-u|--fail-on-unregistered] [-l|--list-migrations] [--configuration CONFIGURATION] [--em EM] [--conn CONN]


[WARNING] Please run `php bin/console doctrine:migrations:migrate` to execute the database migrations.

βš™οΈ  Bolt
=======

 Bolt version: 5.0.0

 * Install type: Packaged distribution
 * Database: mysql 5.5.5-10.3.31-MariaDB-0ubuntu0.20.04.1 - Localhost via UNIX socket (with JSON)
 * PHP version: 7.4.3
 * Symfony version: v5.3.7
 * Operating System: Linux - 5.4.0-81-generic

I ran bin/console doctrine:migrations:sync-metadata-storage and it was ok. I also did doctrine:migrations:migrate but there were no migrations to run.

When I run composer update it shows same error again.

The make install command use an unexisting instruction

The make install command lauch a make db-create command that don't exists.

The error message we get :

make db-create
make[1]: Entering directory '/srv/bolt'
make[1]: *** No rule to make target 'db-create'.  Stop.
make[1]: Leaving directory '/srv/bolt'
make: *** [Makefile:9: install] Error 2

No templates found on installation

I've just installed Bolt4, configured the database connection, run the set up script to configure the basics and install the fixtures.

Then, when I access the URL in the browser I get the following error:

Unable to find one of the following templates: "index.twig", "index.html.twig".

It seems the entire templates directory is missing.

ROLE_EDITOR triggers Access Denied

bolt 4.1.2

When adding a new user in the control panel and giving it ROLE_EDITOR, after logging in it crashes with the following error:

Screenshot 2020-10-19 at 10 38 28

Changing the role to ROLE_ADMIN fixes this, but of course we don't want editors to be admins.

Outdated webpack encore package

Is there a reason the NPM package for @symfony/webpack-encore is still locked to 0.30? They recently released version 4.0 of both the PHP and JS package. Are you open to PRs for these?

setfacl: ... Not supported when using Docker on OSX

I've created a fresh project using

composer create-project bolt/project myproject "2.0.0-beta.6.1"

When running

docker compose up

I get the following errors:

php_1 | setfacl: config: Not supported
php_1 | setfacl: config/bolt: Not supported
php_1 | setfacl: config/bolt/config.yaml: Not supported
php_1 | setfacl: config/bolt/contenttypes.yaml: Not supported
php_1 | setfacl: config/bolt/menu.yaml: Not supported
php_1 | setfacl: config/bolt/permissions.yaml: Not supported
php_1 | setfacl: config/bolt/taxonomy.yaml: Not supported
php_1 | setfacl: config/bundles.php: Not supported
php_1 | setfacl: config/checkpoint.txt: Not supported
php_1 | setfacl: config/extensions: Not supported

and the php container fails to start.

I think these errors are caused by the setfacl calls on these lines in docker/php/docker-entrypoint.sh

setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX config public/files public/theme public/thumbs var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX config public/files public/theme public/thumbs var

Simple workaround could be commenting those lines when using osx as a host, although that might lead to other issues down the road.

Problem when creating the project

When doing composer create-project (with PHP7.4) I am getting this error:

> php bin/console extensions:configure --with-config
PHP Parse error:  syntax error, unexpected token "match" in /bolt/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php on line 41
Script php bin/console extensions:configure --with-config handling the post-install-cmd event returned with error code 255

Any ideas?

Can't install Bolt

Hi everyone !

I am pretty interested in Bolt for many of my and clients projects. I wanted to install it in Local in order to learn how it works.

However, I just can't install it. Following is what I enter in my terminal to create my project and what it returns.

I use PHP Version 8.0.6, Composer 2.0.14.

I do not want to downgrade my PHP Version until I am sure it will not work.

Ξ» composer create-project bolt/project amicale
Creating a "bolt/project" project at "./amicale"
Installing bolt/project (1.3.33)
  - Installing bolt/project (1.3.33): Extracting archive
Created project in C:\wamp64\www\amicale
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - doctrine/orm is locked to version 2.7.5 and an update of this package was not requested.
    - doctrine/orm 2.7.5 requires php ^7.1 -> your php version (8.0.6) does not satisfy that requirement.
  Problem 2
    - phpdocumentor/reflection-docblock is locked to version 4.3.4 and an update of this package was not requested.
    - phpdocumentor/reflection-docblock 4.3.4 requires php ^7.0 -> your php version (8.0.6) does not satisfy that requirement.
  Problem 3
    - tightenco/collect is locked to version v7.26.1 and an update of this package was not requested.
    - tightenco/collect v7.26.1 requires php ^7.1.3 -> your php version (8.0.6) does not satisfy that requirement.
  Problem 4
    - doctrine/orm 2.7.5 requires php ^7.1 -> your php version (8.0.6) does not satisfy that requirement.
    - knplabs/doctrine-behaviors 2.1.0 requires doctrine/orm ^2.7 -> satisfiable by doctrine/orm[2.7.5].
    - knplabs/doctrine-behaviors is locked to version 2.1.0 and an update of this package was not requested.

To fix this, I have specified php version in composer.json. In this case, some child libraries already in PHP8 crash the installation.

I have no idea how to workaround this behaviour ...

Unable to create new project using Composer 2.0.0-RC1

$ composer create-project bolt/project bolt4
Creating a "bolt/project" project at "./bolt4"
Installing bolt/project (1.2.1)
  - Downloading bolt/project (1.2.1)
  - Installing bolt/project (1.2.1): Extracting archive
Created project in /srv/sites/bolt4
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - drupol/composer-packages is locked to version 1.1.2 and an update of this package was not requested.
    - drupol/composer-packages 1.1.2 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - drupol/composer-packages 1.1.2 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - bolt/core 4.0.0 requires drupol/composer-packages ^1.1 -> satisfiable by drupol/composer-packages[1.1.2].
    - bolt/core is locked to version 4.0.0 and an update of this package was not requested.

Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions.

You are using a snapshot build of Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report an issue to them to ask them to support Composer 2. To work around this you can run Composer with --ignore-platform-req=composer-plugin-api, but this may result in broken plugins and bigger problems down the line.

Request, simple production deployment guide or automation?

I read the available documentation on how to configure Bolt for production
but there is no complete list of what files are unrequired or unsafe to store on the production environment.
I follow these steps to prepare my environment for uploading to the web host:

Ensure:

  1. .env: change APP_SECRET to a random value, other than the default

  2. .env: set or add APP_ENV=prod

  3. .env: set or add APP_DEBUG=0

  4. Upload anything except the following:

  • ~/.vs/
  • ~/.vscode/
  • ~/.env.local
  • ~/.git/
  • ~/bin/post-create-project.php
  • ~/var/cache/
  • ~/var/data/ (if not used for sqlite)
  • ~/var/log/
  • Unused themes
  • Unused theme files (dev util js, Less / css maps, css var file generated from less, etc)
  • Any other remaining .local or local files must be compared to the Bolt documentation as they should not be committed (when working with other people) or in production.
  • Remaining developer files like vscode workspace file, executable files (bat etc) if present.

So at this point I have no automation and do not know what should be removed from production.
I checked the bolt/simple-deploy repo but see that it has issues and isn't well documented.

Can I get a list of default files which should be removed after the initial installation and development process?

Use of .env file by docker-compose has side-effect of copying it to the container

In docker-compose.yml the .env file is used (specified with env_file) to configure a number of settings.

Using .env this way has the 'side effect' of copying .env into the container. (Or at least, that is what I saw in a comment on docker/compose#4140 - and it's the observed behavior by a bolt user on slack)

The effect is that you can edit almost all files when using docker, and the changes will be picked up, but if you edit .env the changes will not be picked up by the container. That is quite confusing.

I don't know if there is a real fix possible for this. A separate env file for docker with a comment explaining it won't be reloaded would be clear, but might mean duplication of config.

/bolt page cannot be found on new install

Hi team,

I've just done a new install of Bolt through the composer method and configured it to use MySQL. I'm able to load the frontend however I ran into these issues along the way:

  • Theme Base-2021 folder was empty on the initial attempt
    • This was solved by simply starting again and doing the composer install (now base-2018, base-2021 and skeleton are present)
  • .htaccess file does not accompany the install
    • Solved by just re-downloading from the install guide page

One unsolved problem still exists:

  • /bolt is showing a 404 not found error

Troubleshooting steps thus far:

Frontend here: http://3.232.63.252/
Backend 404: http://3.232.63.252/bolt

It shouldn't be that I'm not using a domain, right?

Other info:
βš™οΈ Bolt
Bolt version: 5.1.18

  • Install type: Packaged distribution
  • Database: mysql 8.0.31-0ubuntu0.22.04.1 - Localhost via UNIX socket (with JSON)
  • PHP version: 7.4.33
  • Symfony version: v5.4.14
  • Operating System: Linux - 5.15.0-1023-aws
  • Memory limit: 1024M

"Your requirements could not be resolved to an installable set of packages" with php 8

`composer create-project bolt/project bolt

Creating a "bolt/project" project at "./bolt"
Installing bolt/project (1.3.19)

  • Downloading bolt/project (1.3.19)
  • Installing bolt/project (1.3.19): Extracting archive
    Created project in /home/___/public_html/BOLT_1/bolt
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Your lock file does not contain a compatible set of packages. Please run composer update.

Problem 1
- bolt/common is locked to version 2.1.10 and an update of this package was not requested.
- bolt/common 2.1.10 requires php ^7.1 -> your php version (8.0.1) does not satisfy that requirement.
Problem 2
- doctrine/dbal is locked to version 2.10.4 and an update of this package was not requested.
- doctrine/dbal 2.10.4 requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
Problem 3
- php-translation/common is locked to version 3.0.1 and an update of this package was not requested.
- php-translation/common 3.0.1 requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
Problem 4
- php-translation/extractor is locked to version 2.0.2 and an update of this package was not requested.
- php-translation/extractor 2.0.2 requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
Problem 5
- php-translation/symfony-bundle is locked to version 0.12.1 and an update of this package was not requested.
- php-translation/symfony-bundle 0.12.1 requires php ^7.1 -> your php version (8.0.1) does not satisfy that requirement.
Problem 6
- php-translation/symfony-storage is locked to version 2.2.0 and an update of this package was not requested.
- php-translation/symfony-storage 2.2.0 requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
Problem 7
- phpdocumentor/reflection-docblock is locked to version 4.3.4 and an update of this package was not requested.
- phpdocumentor/reflection-docblock 4.3.4 requires php ^7.0 -> your php version (8.0.1) does not satisfy that requirement.
Problem 8
- tightenco/collect is locked to version v7.26.1 and an update of this package was not requested.
- tightenco/collect v7.26.1 requires php ^7.1.3 -> your php version (8.0.1) does not satisfy that requirement.
Problem 9
- doctrine/dbal 2.10.4 requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
- knplabs/doctrine-behaviors v2.0.8 requires doctrine/dbal ^2.9 -> satisfiable by doctrine/dbal[2.10.4].
- knplabs/doctrine-behaviors is locked to version v2.0.8 and an update of this package was not requested.`

`composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- bolt/core[4.1.0, ..., 4.1.12] require php-translation/symfony-bundle ^0.12 -> satisfiable by php-translation/symfony-bundle[0.12, 0.12.1].
- php-translation/symfony-bundle[0.12, ..., 0.12.1] require php ^7.1 -> your php version (8.0.1) does not satisfy that requirement.
- Root composer.json requires bolt/core ^4.1 -> satisfiable by bolt/core[4.1.0, ..., 4.1.12].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.`

Mistake in composer.json in release 1.3.26

Hy,

The dependencies in the version 1.3.26 are the dependencies from bolt 5 and not bolt 4

"description": "Bolt 5 standard project skeleton",
    "license": "MIT",
    "require": {
        "bobdenotter/configuration-notices": "^1.0",
        "bobdenotter/weatherwidget": "^1.1",
        "bolt/article": "^1.0",
        "bolt/assets": "^5.0",
        "bolt/core": "^5.0",
        "bolt/newswidget": "^1.1",
        "bolt/redactor": "^1.0",
        "bolt/themes": "^3.3",
        "nelmio/security-bundle": "^2.10",
        "symfony/flex": "^1.6"
    },

Link to the composer.json

Maybe fix it could be a good option to let us install bolt 4 without having a bolt 5 beta project ^^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.