Docker compose for Kitsu and Zou
[TOC]
build.sh [subcommand] [options] local Use local build of Kitsu and Zou containers
down Compose Down the stack -e, --env=ENV_FILE # Set custom env file. If not set ./env is used
--develop # [local, down] Gives access to running code on the host. Clean DB every time it's rebuild.
--keep-db # [local]Keep develop DB data. Should be combined with `--develop`.
-h, --help # Show this helpbash build.shThis will use prebuilt Kitsu and Zou containers, and use the env file as settings.
The setting list for the env file can be found here.
- login: admin@example.com
- password: mysecretpassword
Add your LDAP variables to the env file.
bash sync_ldap.sh -e, --env=ENV_FILE # Set custom env file, must be the same as the env used with build.sh
-h, --help # Show this helpCaution
Be sure to backup your data before upgrading.
# bash db_upgrade [options] oldDbVersion newDbVersion
# PostgreSql 10 to 12
bash db_upgrade.sh 10 12Important
Don't forget to update the DB_VERSION key in your env file after the upgrade.
-e, --env=ENV_FILE # Set custom env file, must be the same as the env used with build.sh
-d, --dry-run
-h, --help # Show this helpCaution
It won't work for Meilisearch < 1.12, see below.
# bash indexer_upgrade [options] oldIdxVersion newIdxVersion
# Meilisearch v1.12.0 to v1.31
bash indexer_upgrade.sh 1.12.0 1.31Important
Don't forget to update the INDEXER_VERSION key in your env file after the upgrade.
-e, --env=ENV_FILE # Set custom env file, must be the same as the env used with build.sh
-d, --dry-run
-h, --help # Show this helpThe indexer upgrade relies on the dump-less upgrade feature introduced in v1.12.
For indexer version below 1.12, the official process is quite cumbersome. An easier (and probably faster) way is simply to update the indexer and recreate the index data from scratch:
- Update the
INDEXER_VERSIONof yourenvfile - relaunch the stack with the
build.shscript - When the stack is up, use
docker exec cgwire-zou-app zou reset-search-index- If you changed the
COMPOSE_PROJECT_NAME, replacecgwire-zou-appwith your zou-app container name
- If you changed the
bash get_dependencies.sh # Clone Kitsu and Zou Dockerfiles into sub-folderslocal build also need those (not required for development stack):
bash get_dependencies.sh # Development stack needs standard build dependencies
bash get_dependencies.sh develop # Clone the official Kitsu and Zou repos from CGwire's GithubThe get_dependencies script provides flag to update them:
get_dependencies --update # Pull the dependencies
get_dependencies develop --update # Pull the development dependenciesget_dependencies --update --force # Do a `reset --hard` before the pull
get_dependencies develop --update # Do the same for the development dependencies Even if those flags works with the develop sub-command,
it's safer to manage the kitsu-dev and zou-dev folders yourself.
In case you want to modify the images, you'll need the dependencies, and then build them:
bash build.sh localTo actively develop on Kitsu or Zou, you'll need the dependencies and a special stack:
bash build.sh local --developKitsu and Zou workspaces are then accessible and can be modified from the host while the stack is running.
You can found them in the kitsu-dev and zou-dev folders.
Depending on the modifications, you may need to restart the containers or relaunch the last command to rebuild them.
To prevent conflict with production stacks, a -dev suffix is automatically added to the COMPOSE_PROJECT_NAME variable.
Also, the default exposed port is 8080, it can be changed by adding DEV_PORT variable to you env file.
Caution
The development DB is wiped out each time you launch the 'build.sh local --develop' command', unless you specify the '--keep-db' option
Those Dockerfiles are based on CG Wire work, a company based in France. They help small to midsize CG studios to manage their production and build a pipeline efficiently.
They apply software craftsmanship principles as much as possible. They love coding and consider that strong quality and good developer experience matter a lot. Through their diverse experiences, they allow studios to get better at doing software and focus more on artistic work.
Visit cg-wire.com for more information.
