Features:
- Based on laradock.
- Make commands based on ansible playbooks.
- Allows you to store configuration files for local/staging/production environments in the repository.
- Allows you to store credentials and settings in encrypted .yml with using ansible vault.
- Commands allow you to quickly up/stop/restart/rebuild docker containers on different environments (local, staging, production).
- Commands allow you to quickly create staging server with using DO droplets.
- Commands allow you to quickly configure production server.
- Commands allow you to quickly update your staging/production servers.
- Commands allow you to quickly install OctoberCMS and start new project with empty theme.
- Commands allow you to quickly import/export database, images, content with saving zip archive on bitbacket
- Install docker, ansible, make.
- For Ubuntu:
sudo bash bash/install-ubuntu.sh. - For Linux Mint:
sudo bash bash/install-mint.sh.
- Run
sudo usermod -a -G docker $USER. You need reboot system, after running the command.
- You can run the project using
make local-upcommand. - You can check docker container status using
make docker-statuscommand. - You can connect to workspace using
make local-bashcommand. - You can run migrations using
make local-october-upcommand.
app/vendor folder can be in .gitignore file, so after cloning project you need to run
local-composer-installcommand.
- Clone repo with project.
- Run
make local-first-startcommand. - Connect to workspace. Run
make local-bashcommand. - Run
nmp iandnpm run watchcommands.
- Run
make local-upcommand. - Connect to workspace. Run
make local-bashcommand. - Run
npm run watchcommands. - You start to do the task.
If you get database error, after updating the project, then you can update your database (
make import-mysql-db) or apply migrations (make local-october-up).
If you get non-database error, after updating the project, then you can try run
make local-composer-installcommand.
- Maildev - http://localhost:1080/
- PHPMyAdmin - http://localhost:8080/
- Beanstalkd console - http://localhost:2080/
- Netdata - http://localhost:19999/
- Grafana - http://localhost:3000/
- Metabase - http://localhost:3030/
- Portainer - http://localhost:9010/
- Docker web UI - http://localhost:8754/
- PHPRedisAdmin - http://localhost:9987/
- Kibana - http://localhost:5601/
Starts docker machines. Run import-full command.
make local-first-start [src=bitbucket|staging|production]Starts docker machines.
make local-upRestarts docker machines.
make local-restartStops docker machines.
make local-stopRebuild and restart docker machines.
make local-rebuildConnect to workspace with laradock user
make local-bashConnect to workspace with laradock user and run composer install
make local-composer-installConnect to workspace with laradock user and apply migrations
make local-october-upConnect to workspace with laradock user and run npm run prod
make local-npm-prodConnect to Sphinx search container and run indexer --rotate --all
make local-sphinx-rotate-all- Download db.zip file from bitbucket.
- Get dump db.sql file from temp/db.zip archive.
- Import mysql dump file.
make import-mysql-db [src=bitbucket|staging|production]- Export mysql database in db.sql file.
- Create temp/db.zip archive with db.sql file.
- Upload db.zip archive to bitbucket.
make export-mysql-db [src=bitbucket]- Download content.zip file from bitbucket.
- Get content files from temp/content.zip archive.
- Copy content folders: meta, content.
make import-content [src=bitbucket|staging|production]- Copy content folders: meta, content.
- Create temp/content.zip archive with content files.
- Upload content.zip archive to bitbucket.
make export-content [src=bitbucket]- Download images.zip file from bitbucket.
- Get images files from temp/images.zip archive.
- Copy images folders: upload, media.
make import-images [src=bitbucket|staging|production]- Copy images folders: upload, media.
- Create temp/images.zip archive with images files.
- Upload images.zip archive to bitbucket.
make export-images [src=bitbucket]Starts import mysql database, content files, images.
make import-full [src=bitbucket|staging|production]Starts export mysql database, content files, images.
make export-full [src=bitbucket]Features:
- Allow you to create/update DO droplets.
- Creates app_user on server. Docker container starts from 'app_user' user. Project folder is '/home/app_user/project'.
- Allow you to quickly update project on DO droplets.
Creates droplet machine.
make staging-create [prefix=staging]Configure server default setup.
make staging-provisioning [prefix=staging]Connect to staging server. Starts docker machines. Run import-full command.
make staging-first-start [prefix=staging] [version=master] [src=bitbucket|production]Connect to staging server. Starts docker machines.
make staging-up [prefix=master]Connect to staging server and update project
make staging-pull [prefix=master] [version=master]Connect to staging server. Restarts docker machines.
make staging-restart [prefix=master]Stops docker machines on staging server.
make staging-stop [prefix=master]Rebuild and restart docker machines on staging server.
make staging-rebuild [prefix=master]- Connect to staging droplet.
- Download db.zip file from bitbucket.
- Get dump db.sql file from temp/db.zip archive.
- Import mysql dump file.
make staging-import-mysql-db [prefix=master] [src=bitbucket|staging|production]- Connect to staging droplet.
- Export mysql database in db.sql file.
- Create temp/db.zip archive with db.sql file.
- Upload db.zip archive to bitbucket.
make staging-export-mysql-db [prefix=master] [src=bitbucket]- Connect to staging droplet.
- Download content.zip file from bitbucket.
- Get content files from temp/content.zip archive.
- Copy content folders: meta, content.
make staging-import-content [prefix=master] [src=bitbucket|staging|production]- Connect to staging droplet.
- Copy content folders: meta, content.
- Create temp/content.zip archive with content files.
- Upload content.zip archive to bitbucket.
make staging-export-content [prefix=master] [src=bitbucket]- Connect to staging droplet.
- Download images.zip file from bitbucket.
- Get images files from temp/images.zip archive.
- Copy images folders: upload, media.
make staging-import-images [prefix=master] [src=bitbucket|staging|production]- Connect to staging droplet.
- Copy images folders: upload, media.
- Create temp/images.zip archive with images files.
- Upload images.zip archive to bitbucket.
make staging-export-images [prefix=master] [src=bitbucket]Starts import mysql database, content files, images.
make staging-import-full [src=bitbucket|staging|production]Starts export mysql database, content files, images.
make staging-export-full [src=bitbucket]Connect to Sphinx search container and run indexer --rotate --all
make staging-sphinx-rotate-allFeatures:
- Allow you to configure production server.
- Creates app_user on server. Docker container starts from 'app_user' user. Project folder is '/home/app_user/project'.
- Allow you to quickly update project on production server.
Connect to production server. Starts docker machines.
make production-upConnect to production server and update project.
make production-pullConnect to production server and update project.
make production-simple-pullConnect to production server. Restarts docker machines.
make production-restartStops docker machines on production server.
make production-stopRebuild and restart docker machines on production server.
make production-rebuild- Connect to production server.
- Download db.zip file from bitbucket.
- Get dump db.sql file from temp/db.zip archive.
- Import mysql dump file.
make production-import-mysql-db [src=bitbucket]- Connect to production server.
- Export mysql database in db.sql file.
- Create temp/db.zip archive with db.sql file.
- Upload db.zip archive to bitbucket.
make production-export-mysql-db [src=bitbucket]- Connect to production server.
- Download content.zip file from bitbucket.
- Get content files from temp/content.zip archive.
- Copy content folders: meta, content.
make production-import-content [src=bitbucket]- Connect to production server.
- Copy content folders: meta, content.
- Create temp/content.zip archive with content files.
- Upload content.zip archive to bitbucket.
make production-export-content [src=bitbucket]- Connect to production server.
- Download images.zip file from bitbucket.
- Get images files from temp/images.zip archive.
- Copy images folders: upload, media.
make production-import-images [src=bitbucket]- Connect to production server.
- Copy images folders: upload, media.
- Create temp/images.zip archive with images files.
- Upload images.zip archive to bitbucket.
make production-export-images [src=bitbucket]Starts import mysql database, content files, images.
make production-import-full [src=bitbucket]Starts export mysql database, content files, images.
make production-export-full [src=bitbucket]Connect to Sphinx search container and run indexer --rotate --all
make production-sphinx-rotate-allSteps of quick start of new project:
- You need to change *.yml files with vars in folder ansible/vars.
- You need to check and change template files in folder ansible/templates.
- You need to change workspace host name in ansible/*-hosts.yml and playbooks (For example: from laradockoctober_workspace_1 to laradockmyproject_workspace_1).
- You need to set app_user password in provision playbooks with using dock.
- Run
make project-installcommand.