You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

3.3 KiB

Important notice

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: gogocarto docker install documentation

Intermediate docker image is cached on docker.0k.io if needed

To rebuild a new version, I pushed the huge docker image of gogocarto container that is required in the process (that contains apache and all build/install tools). Note that this should not require to be rebuild if anything important changes in the directory docker/.

Using:

docker_tree_hash=$(git rev-parse HEAD:docker)
docker tag docker_gogocarto docker.0k.io/gogocarto-builder:${docker_tree_hash}
docker push docker.0k.io/gogocarto-builder:${docker_tree_hash}

So, if needed, it can be pulled back to avoid the hassle of making it:

docker_tree_hash=$(git rev-parse HEAD:docker)
docker pull docker.0k.io/gogocarto-builder:${docker_tree_hash} &&
docker tag docker.0k.io/gogocarto-builder:${docker_tree_hash} docker_gogocarto

You still need to do (as of <2020-10-20 Tue>):

  • get the latest source code

  • make up to launch de containers with the images

  • make shell from the latest git repos

  • make init in the container

Full release is cached on docker.0k.io/downloads

This is the content of the source tree, once populated by make init.

mongodb is not included

As of <2020-10-23 Fri>, the Makefile's init target is:

$ grep ^init Makefile -A1
init: install assets load-fixtures fix-perms ## Initialize the project

Note that ``load-fixtures`` target is actually mongodb initialization:

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

This will be done in the hooks/mongo_database-relation-joined accordingly.

o create the full data release bundle this is what was made:

## 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
commit_sha=$(git describe HEAD --tags)
tar cjv \
    bin web vendor config src templates translations \
    --exclude=.git --exclude=.gitignore \
    > gogocarto-${commit_sha}.tar.bz2

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.

Roadmap

TODO mongo / the default database name is probably not correctly set.

Indeed, it seems it is defaulted to gogocarto_default and I didn't find yet how to set it. There's a connection with SAAS mode I think.