This is a Docker image for Bolt CMS.
- Clone this repository and cd into it.
- Extract
boltcms.tar.gz
intodocker/boltcms/
directory:
tar -xvzf docker/boltcms.tar.gz -C docker/boltcms/
- Rename
docker/.env.example
todocker/.env
and set the environment variables. - Edit
docker/boltcms/.env
and set the environment variables forAPP_SECRET
andDATABASE_URL
. - Change into the
docker
directory and rundocker compose build
to build the docker image. - Run
docker compose up -d
to start the containers. - Get the container name of the
boltcms-app
container by runningdocker compose ps
. - Enter the
boltcms-app
container by running the following command:
docker exec -it <CONTAINER-NAME> bash
- Run the following command in the container to setup Bolt CMS:
bin/console bolt:setup
Follow the instructions.
- Set file system permissions. Make sure the Apache i.e.
www-data
user has write permissions to bolt directories with e.g.:
chown -R www-data:www-data /var/www/html/var
chown -R www-data:www-data /var/www/html/config
chown -R www-data:www-data /var/www/html/public/files
chown -R www-data:www-data /var/www/html/public/theme
chown -R www-data:www-data /var/www/html/public/thumbs
- Visit
http://<YOUR_IP>:<BOLTCMS_PORT>/bolt
in your browser and login with the credentials you set in step 9. - You may want to proxy the
boltcms-app
andPHP-MyAdmin
containers with a web server like Nginx or Apache. For Apache e.g.:
ProxyPass /phpmyadmin/ http://localhost:8080/
ProxyPassReverse /phpmyadmin/ http://localhost:8080/
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
- Update Bolt CMS with composer by running the following command in the
boltcms-app
container:
composer update
This project is licensed under the MIT License - see the LICENSE file for details.