{"id":18358783,"url":"https://github.com/phmlabs/koalainfra","last_synced_at":"2026-02-09T23:30:59.202Z","repository":{"id":141985307,"uuid":"49272535","full_name":"phmLabs/KoalaInfra","owner":"phmLabs","description":null,"archived":false,"fork":false,"pushed_at":"2016-03-08T19:48:23.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T18:36:36.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phmLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-08T13:06:30.000Z","updated_at":"2016-04-16T09:29:01.000Z","dependencies_parsed_at":"2023-04-26T01:32:41.862Z","dependency_job_id":null,"html_url":"https://github.com/phmLabs/KoalaInfra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmLabs%2FKoalaInfra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmLabs%2FKoalaInfra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmLabs%2FKoalaInfra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phmLabs%2FKoalaInfra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phmLabs","download_url":"https://codeload.github.com/phmLabs/KoalaInfra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148217,"owners_count":21055547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T22:19:25.016Z","updated_at":"2026-02-09T23:30:58.144Z","avatar_url":"https://github.com/phmLabs.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [What you get](#what-you-get)\n- [One-Time Prerequisites setup](#one-time-prerequisites-setup)\n  - [Get VirtualBox with Guest additions](#get-virtualbox-with-guest-additions)\n  - [Create the VM](#create-the-vm)\n  - [Set environment variables](#set-environment-variables)\n  - [Get the code](#get-the-code)\n  - [Set up NFS](#set-up-nfs)\n  - [Mount the NFS share into VM](#mount-the-nfs-share-into-vm)\n  - [Setup the docker containers](#setup-the-docker-containers)\n  - [Start or stop the docker containers](#start-or-stop-the-docker-containers)\n  - [See the logs](#see-the-logs)\n  - [Recreate the containers](#recreate-the-containers)\n    - [Access commandline](#access-commandline)\n  - [Install symfony dependencies](#install-symfony-dependencies)\n- [Executing tests](#executing-tests)\n- [FAQ](#faq)\n  - [Restart docker](#restart-docker)\n  - [Remove docker container](#remove-docker-container)\n  - [Access commandline](#access-commandline)\n  - [Machine is not reachable](#machine-is-not-reachable)\n\n# What you get\n\n- [http://koalamon.local](The App itself)\n\n# One-Time Prerequisites setup\n\nTo enable coherent environments across all stages of development to production, we are using a Docker-managed server setup.\nFollow the next bits of the ***one-time prerequisites setup*** carefully and you will be fine. It is assumed you are using\nMac OS with homebrew properly set up.\n\n## Get VirtualBox with Guest additions\n\nBrew is a good choice here.\n\n```\nbrew install caskroom/cask/brew-cask\nbrew cask install dockertoolbox\n```\n## Create the VM\n\n\n    docker-machine \\\n      create --driver virtualbox \\\n      --virtualbox-hostonly-cidr \"192.168.59.1/24\" \\\n      --virtualbox-memory 4096 \\\n      koalamon\n\n## Set environment variables\n\n```\ndocker-machine env koalamon\neval \"$(docker-machine env koalamon)\"\n```\n\nIn order that you don't have to write this in every new terminal, execute following command to put it in your shell config\n\n**Bash**\n\n```\necho 'eval \"$(docker-machine env koalamon)\"' \u003e\u003e ~/.bashrc\n```\n\n**zsh**\n\n```\necho 'eval \"$(docker-machine env koalamon)\"' \u003e\u003e ~/.zshrc\n```\n\n\n## Get the code\n\nClone this repository to some directory that suits your workflow best.\nFor example, in your `~/Site` or `~/code` directory:\n\n```\nmkdir koalamon \u0026\u0026 cd koalamon \u0026\u0026 git clone https://github.com/koalamon/Koalamon\n```\n\n## Set up NFS\nrun the following in your Koalamon's **parent directory**:\n```\nsudo touch /etc/exports;\necho \"# Boot2docker\n\\\"`$(echo pwd)`\\\" -alldirs -mapall=$(whoami) -network 192.168.59.0 -mask 255.255.255.0\" | sudo tee -a /etc/exports;\nsudo nfsd checkexports \u0026\u0026 sudo nfsd restart;\n```\n\n## Mount the NFS share into VM\n\nThen, in your `Koalamon` directory, type:\n\n***Important***: Write each command for itself. Might return 1. Then just repeat.\n\n```\neval \"$(docker-machine env koalamon)\";\ndocker-machine ssh koalamon \"grep -q '8.8.8.8' /etc/resolv.conf; [ $? -ne 0 ] \u0026\u0026 echo 'nameserver 8.8.8.8' \u003e\u003e /etc/resolv.conf;\";\ndocker-machine ssh koalamon \"echo '#\\!/bin/sh' | sudo tee /var/lib/boot2docker/bootlocal.sh \u0026\u0026 sudo chmod 755 /var/lib/boot2docker/bootlocal.sh \u0026\u0026 echo 'sudo mkdir -p /var/www/koalamon \u0026\u0026 sudo mount -t nfs -o noatime,soft,nolock,vers=3,udp,proto=udp,rsize=8192,wsize=8192,namlen=255,timeo=10,retrans=3,nfsvers=3 -v 192.168.59.1:`$(echo pwd)`/.. /var/www/koalamon' | sudo tee -a /var/lib/boot2docker/bootlocal.sh\";\ndocker-machine restart koalamon;\n```\n\n\n\nThen enter koalamon.local to your /etc/hosts file:\n\n```\nsudo echo \"\\n ${docker-machine ip koalamon} koalamon.local\" \u003e\u003e /etc/hosts\n```\n\n## Setup the docker containers\n\nRun in your `KoalaInfra/Docker` directory:\n\n```\neval \"$(docker-machine env koalamon)\" \u0026\u0026 docker-compose up\n```\n\n## Start or stop the docker containers\n\nIf you just have exited from the setup command and no rebuilt is needed you can just start the existing containers by\n`eval \"$(docker-machine env koalamon)\" \u0026\u0026 docker-compose start`.\n\nor if needed to stop use:\n`eval \"$(docker-machine env koalamon)\" \u0026\u0026 docker-compose stop`\n\n## See the logs\n\nYou can see the log files of the running containers by executing: `eval \"$(docker-machine env koalamon)\" \u0026\u0026 docker-compose logs`\n\n## Recreate the containers\n\nJust execute `docker-compose up`. Be aware of warnings. Maybe you have to remove existing containers. (FAQ)(#faq)\n\n### Access commandline\n\nRun `docker ps` to get a list of available containers. The can be accessed like for example `docker exec -it koalamonapi_php_1 bash` or `docker exec -it koalamonapi_db_1 bash`\n\n## Install symfony dependencies\n\nAttach to the php docker container with `docker exec -it koalamonapi_php_1` and then in the container execute `composer install` or `composer update`.\n\n# Executing tests\n\nTests of can be executed by: `bin/phpunit -c app/`\n\n# FAQ\n\n## Restart docker\n\n`docker-machine ssh koalamon sudo /etc/init.d/docker restart\n\n## Remove docker container\n\n`docker-compose rm \u003cid\u003e`\n Example:\n `docker-compose rm php`\n\nYou can also remove all: `docker-compose rm`.\n\n## Access commandline\n\n`docker exec -it \u003ccontainer_id\u003e bash`\n\nFor example:\n\n`docker exec -it app_koalamon_api_php bash`\n\n\n## Machine is not reachable\nDu to a bug in docker-machine in combination with VirtualBox in some cases the docker-machine command cannot execute commands on\nthe virtual box image.\n\n```\nsudo route -nv delete -net 192.168.59 -interface vboxnet0\nsudo route -nv add -net 192.168.59 -interface vboxnet0\ndocker-machine regenerate-certs koalamon\ndocker-machine env koalamon\neval \"${docker-machine env koalamon}\"\n```\n\nvboxnet0 has to be replaced by your virtualhost network adapter which is used by the vm.\n\n# Features\n\nSettings in `docker-composer.yml` can be overwritten per-environment by using [multiple files](https://docs.docker.com/compose/extends/#different-environments).\n\nYou can link containers in `docker-compose.yml` [doc](https://docs.docker.com/compose/compose-file/#links). This will create a hostname alias and several environment variables inside that container, allowing it to access the linked container. For example linking a `mysql` container to the web container ensures access to the MySQL using the environment variable `$MYSQL_PORT`.\n\nPossible available dependencies for `composer.json` [php-support](https://devcenter.heroku.com/articles/php-support).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphmlabs%2Fkoalainfra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphmlabs%2Fkoalainfra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphmlabs%2Fkoalainfra/lists"}