|
|
* Minimal =compose.yml=
#+begin_src yaml gogocarto: options: admin-password: MYADMINPASSWORD #+end_src
* Charm note and status
As the current docker install of gogocarto as of <2020-10-20 Tue> is far from being mature, we try here to get only the released part.
We are talking of: [[https://gitlab.adullact.net/pixelhumain/GoGoCarto/-/blob/f3c10f16fc08b533ef44f1325fdb50f87fa73224/docs/installation_docker.md][gogocarto docker install documentation]]
** Updating
This process will ensure to avoid rebuilding the gigantic intermediate image needed (with apache and build/install tools).
You need to run this from the root of a code checkout of: https://gitlab.adullact.net/pixelhumain/GoGoCarto
#+begin_src sh docker_tree_hash=$(git rev-parse HEAD:docker) ## Intermediate docker image is cached on docker.0k.io if needed if ! docker pull docker.0k.io/gogocarto-builder:${docker_tree_hash}; then make build && docker tag docker_gogocarto docker.0k.io/gogocarto-builder:${docker_tree_hash} && docker push docker.0k.io/gogocarto-builder:${docker_tree_hash} else docker tag docker.0k.io/gogocarto-builder:${docker_tree_hash} docker_gogocarto fi make up && docker-compose -f docker/docker-compose.yml exec gogocarto make init #+end_src
** Full release is cached on =docker.0k.io/downloads=
This is the content of the source tree, once populated by =make init=.
*** mongodb initialisation is not included in source and is handled by the charm
As of <2020-10-23 Fri>, the =Makefile='s =init= target is:
#+begin_src sh $ grep ^init Makefile -A1 init: install assets load-fixtures fix-perms ## Initialize the project #+end_src
Note that =load-fixtures= target is actually the mongodb initialization:
#+begin_src sh load-fixtures: ## Create the DB schema, generate DB classes and load fixtures $(SYMFONY) doctrine:mongodb:schema:create $(SYMFONY) doctrine:mongodb:generate:hydrators $(SYMFONY) doctrine:mongodb:generate:proxies $(SYMFONY) doctrine:mongodb:fixtures:load -n #+end_src
This will be done in the =hooks/mongo_database-relation-joined= accordingly.
*** create the full data release bundle this is what was made
#+begin_src sh ## correct bundles links (no idea if it is needed) ( cd web/bundles for i in *; do link_target=$(readlink "$i") ln -sf /opt/apps/gogocarto"${link_target#/var/www}" "$i" done ) ## Force original versions git co web/index.php config/packages/doctrine_mongodb.yaml bin/console sed -ri "s/^(<\?php)/\1\n\ini_set('memory.limit', '1024M');/" \ web/index.php bin/console sed -ri "s%dirname\(__DIR__\)\.'%'/opt/apps/gogocarto%g" \ web/index.php sed -ri "s/gogocarto_default/'%env(MONGODB_DATABASE)%_default'/g" \ config/packages/doctrine_mongodb.yaml commit_sha=$(git describe HEAD --tags) tar cjv \ bin web vendor config src templates translations \ --exclude=.git --exclude=.gitignore \ --owner=root --group=root \ > gogocarto-${commit_sha}.tar.bz2 #+end_src
This is still far from being perfect, I wonder if we can just remove all non '\*.{php,yml,js}' files. I noticed many many unrelated files in =vendor/=.
We need =bin= for symphony utilities that allows to setup things.
|