Use this workflow when m49n/docker_october receives global improvements and you need to bring them into an existing OctoberCMS project.
Do not edit production containers by hand. Update the project repository, commit the changes, build new images and deploy.
From the OctoberCMS project root:
git status --short
./scripts/update-kit.sh
git diff --stat
git diff
git add Dockerfile docker-compose.prod.yml docker-compose.web-bluegreen.yml bitbucket-pipelines.yml gitlab-ci.example.yml .dockerignore .gitattributes auth.json.example docker docs scripts tests
git commit -m "Update production Docker kit"
git pushThen deploy normally:
export IMAGE_TAG=$(git rev-parse --short HEAD)
DOCKER_BUILDKIT=1 docker build --target app -t october-app:$IMAGE_TAG .
DOCKER_BUILDKIT=1 docker build --target nginx -t october-nginx:$IMAGE_TAG .
sed -i "s/^IMAGE_TAG=.*/IMAGE_TAG=$IMAGE_TAG/" .env
DEPLOY_PULL=0 USE_LOCAL_DB=1 ./scripts/deploy.shThe default sync updates:
Dockerfiledocker-compose.prod.ymldocker-compose.web-bluegreen.yml.dockerignore.gitattributesauth.json.examplebitbucket-pipelines.ymlif it does not already existgitlab-ci.example.ymldocker/docs/scripts/tests/
The script does not touch real secrets:
.envauth.jsonvendor/storage/
Projects often customize these files, so the script does not overwrite them by default:
.env.example.gitignoreREADME.mdbitbucket-pipelines.yml
Instead, refreshed template versions are written to:
.env.example.docker-kit
.gitignore.docker-kit
README.docker-kit.md
bitbucket-pipelines.docker-kit.yml
Review and merge them manually when needed.
Overwrite .env.example:
UPDATE_KIT_OVERWRITE_ENV_EXAMPLE=1 ./scripts/update-kit.shOverwrite .gitignore:
UPDATE_KIT_OVERWRITE_GITIGNORE=1 ./scripts/update-kit.shOverwrite README.md:
UPDATE_KIT_INCLUDE_README=1 ./scripts/update-kit.shOverwrite bitbucket-pipelines.yml:
UPDATE_KIT_OVERWRITE_BITBUCKET_PIPELINE=1 ./scripts/update-kit.shAllow running with tracked local changes:
UPDATE_KIT_ALLOW_DIRTY=1 ./scripts/update-kit.shRemove the existing docker/ directory before copying the template version:
UPDATE_KIT_PRUNE_DOCKER=1 ./scripts/update-kit.shUse another template source or branch:
TEMPLATE_REPO=https://github.com/m49n/docker_october.git TEMPLATE_REF=main ./scripts/update-kit.shRun the script from Git Bash or WSL:
cd /d/OSPanel/domains/example.loc
./scripts/update-kit.shIf you use PowerShell only, copy the kit files manually and review git diff before committing.