{"id":22153658,"url":"https://github.com/frugan-dev/lbd-xaas","last_synced_at":"2025-06-19T09:40:35.178Z","repository":{"id":239201767,"uuid":"798856323","full_name":"frugan-dev/lbd-xaas","owner":"frugan-dev","description":"Collection of simple applications for Learning By Doing across different XaaS (Anything as a Service) stacks and cloud infrastructures","archived":false,"fork":false,"pushed_at":"2024-05-13T09:42:30.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T13:46:14.495Z","etag":null,"topics":["aws","caas","faas","gae","iaas","k8s","kubernetes","learning-by-doing","paas","serverless","xaas"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frugan-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","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":"2024-05-10T16:05:48.000Z","updated_at":"2024-05-13T09:42:34.000Z","dependencies_parsed_at":"2024-05-10T17:29:53.090Z","dependency_job_id":"a1a45bd3-aa57-43fd-ac8b-e742acfc6655","html_url":"https://github.com/frugan-dev/lbd-xaas","commit_stats":null,"previous_names":["frugan-dev/lbd-xaas"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frugan-dev/lbd-xaas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frugan-dev%2Flbd-xaas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frugan-dev%2Flbd-xaas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frugan-dev%2Flbd-xaas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frugan-dev%2Flbd-xaas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frugan-dev","download_url":"https://codeload.github.com/frugan-dev/lbd-xaas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frugan-dev%2Flbd-xaas/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260726497,"owners_count":23053167,"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":["aws","caas","faas","gae","iaas","k8s","kubernetes","learning-by-doing","paas","serverless","xaas"],"created_at":"2024-12-02T01:35:46.932Z","updated_at":"2025-06-19T09:40:30.162Z","avatar_url":"https://github.com/frugan-dev.png","language":"Dockerfile","readme":"[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n# Learning By Doing: Exploring XaaS with Simple Applications\n\nCollection of simple applications for Learning By Doing across different XaaS (Anything as a Service) stacks and cloud infrastructures.\n\n### Inspired by\n\n- https://github.com/wadexu007/learning_by_doing\n- https://github.com/tuupola/php-docker-k8s\n\n### Getting Started\n\n1\\) First of all clone this repository:\n\n```sh\n$ git clone git@github.com:frugan-dev/lbd-xaas.git\n$ cd lbd-xaas\n```\n\n2\\) Copy and rename these files: \n\n```\nsrc/.env.dist -\u003e src/.env\nsrc/private/app/.env.dist -\u003e src/private/app/.env\n```\n\nand edit them according to your needs.\n\n## Docker compose\n\n\u003cdetails\u003e\n\u003csummary\u003eRequirements\u003c/summary\u003e\n\n- [Docker Desktop](https://docs.docker.com/desktop/) (or [Docker Engine](https://docs.docker.com/engine/) + [Docker Compose](https://docs.docker.com/compose/))\n- [mkcert](https://github.com/FiloSottile/mkcert)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInstallation\u003c/summary\u003e\n\n1\\) Create local CA with mkcert:\n\n```sh\n$ mkcert -install\n```\n\n2\\) Run install script:\n\n```sh\n$ cd src\n$ sudo chmod +x install.sh\n$ ./install.sh\n$ docker compose up -d\n```\n\n3\\) Capture the Docker PHP-FPM container logs:\n\n```sh\n$ docker compose logs -f php-fpm\n```\n\nand wait until all initialization operations are completed.\n\n4\\) Browse via HTTPS to the following address https://localhost.\n\n5\\) Stop, delete everything and return to parent folder:\n\n```sh\n$ docker compose down\n$ docker system prune --all\n$ cd ../\n```\n\u003c/details\u003e\n\n## Google App Engine standard (second-generation runtime)\n\n\u003cdetails\u003e\n\u003csummary\u003eRequirements\u003c/summary\u003e\n\n- [Docker Desktop](https://docs.docker.com/desktop/) (or [Docker Engine](https://docs.docker.com/engine/) + [Docker Compose](https://docs.docker.com/compose/))\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInstallation\u003c/summary\u003e\n\n\u003e Note: PHP v8.2 is used, instead of v8.3, because at the time of writing the following error message appears:\n\u003e \n\u003e `RuntimeError: Unknown runtime 'php83'; supported runtimes are 'go119', 'go120', 'go121', 'go122', 'php81', 'php82', 'python310', 'python311', 'python312', 'python38', 'python39'`.\n\n1\\) Run deploy script:\n\n```sh\n$ cd gae-standard\n$ sudo chmod +x deploy.sh\n$ ./deploy.sh\n```\n\n2\\) Capture the Docker container logs:\n\n```sh\n$ docker compose logs -f local\n```\n\nand wait until all initialization operations are completed.\n\n3\\) Browse the application via HTTP to the following address http://localhost:8080.\n\n4\\) Browse the administration console via HTTP to the following address http://localhost:8000.\n\n5\\) Stop, delete everything and return to parent folder:\n\n```sh\n$ docker compose down\n$ docker system prune --all\n$ cd ../\n```\n\n\u003c/details\u003e\n\n## Google App Engine flexible (second-generation runtime)\n\n\u003cdetails\u003e\n\u003csummary\u003eRequirements\u003c/summary\u003e\n\n- [Docker Desktop](https://docs.docker.com/desktop/) (or [Docker Engine](https://docs.docker.com/engine/) + [Docker Compose](https://docs.docker.com/compose/))\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInstallation\u003c/summary\u003e\n\n\u003e Note: at the time of writing, despite having followed the official documentation, this stack does not work and the following error message appears:\n\u003e \n\u003e `In env: flex, only the following runtimes are allowed: ('python-compat', 'go', 'custom')`\n\n1\\) Run deploy script:\n\n```sh\n$ cd gae-flexible\n$ sudo chmod +x deploy.sh\n$ ./deploy.sh\n```\n\n2\\) Capture the Docker container logs:\n\n```sh\n$ docker compose logs -f local\n```\n\nand wait until all initialization operations are completed.\n\n3\\) Browse the application via HTTP to the following address http://localhost:8080.\n\n4\\) Browse the administration console via HTTP to the following address http://localhost:8000.\n\n5\\) Stop, delete everything and return to parent folder:\n\n```sh\n$ docker compose down\n$ docker system prune --all\n$ cd ../\n```\n\n\u003c/details\u003e\n\n## Kubernetes (stateful)\n\n\u003cdetails\u003e\n\u003csummary\u003eRequirements\u003c/summary\u003e\n\n- [Minikube](https://minikube.sigs.k8s.io/docs/start/)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInstallation\u003c/summary\u003e\n\n1\\) Create `stateful-app` image in your Docker local registry:\n\n```sh\n$ DOCKER_BUILDKIT=1 docker build \\\n  -f k8s-stateful/Dockerfile \\\n  -t registry.local/stateful-app:latest \\\n  .\n```\n\nNote: about `DOCKER_BUILDKIT=1` see here [https://stackoverflow.com/a/57774684/3929620](https://stackoverflow.com/a/57774684/3929620).\n\n2\\) Verify that the image was created correctly in Docker local registry:\n\n```sh\n$ docker image ls\n```\n\n3\\) Start Minikube cluster:\n\n```sh\n$ minikube start\n```\n\n4\\) Push Docker local image to Minikube local registry:\n\n```sh\n$ minikube image load registry.local/stateful-app\n```\n\n5\\) Verify that the image was created correctly in Minikube local registry:\n\n```sh\n$ minikube image ls\n```\n\n6\\) Apply resources from Kustomize configurations:\n\n```sh\n$ kubectl apply -k ./k8s-stateful\n```\n\n7\\) Verify that all pods are in `Running` state:\n\n```sh\n$ kubectl get pods\n```\n\n8\\) Get the NodePort using the service command:\n\n```sh\n$ minikube service stateful-app-service --url\n```\n\n9\\) Browse via HTTP to the address returned (e.g. http://192.168.0.0:12345).\n\n10\\) Stop and delete everything:\n\n```sh\n$ kubectl delete -k ./k8s-stateful\n$ minikube image rm registry.local/stateful-app\n$ minikube image rm docker.io/bitnami/apache\n$ minikube stop\n$ minikube delete\n$ docker system prune --all\n```\n\n\u003c/details\u003e\n\n## Kubernetes (stateless)\n\n\u003cdetails\u003e\n\u003csummary\u003eRequirements\u003c/summary\u003e\n\n- [Minikube](https://minikube.sigs.k8s.io/docs/start/)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInstallation\u003c/summary\u003e\n\n1\\) Create `stateless-app` image in your Docker local registry:\n\n```sh\n$ DOCKER_BUILDKIT=1 docker build \\\n  --secret id=.env,src=$PWD/src/.env \\\n  -f k8s-stateless/Dockerfile \\\n  -t registry.local/stateless-app:latest \\\n  .\n```\n\nNote: about `DOCKER_BUILDKIT=1` see here [https://stackoverflow.com/a/57774684/3929620](https://stackoverflow.com/a/57774684/3929620).\n\n2\\) Verify that the image was created correctly in Docker local registry:\n\n```sh\n$ docker image ls\n```\n\n3\\) Start Minikube cluster:\n\n```sh\n$ minikube start\n```\n\n4\\) Push Docker local image to Minikube local registry:\n\n```sh\n$ minikube image load registry.local/stateless-app\n```\n\n5\\) Verify that the image was created correctly in Minikube local registry:\n\n```sh\n$ minikube image ls\n```\n\n6\\) Apply resources from Kustomize configurations:\n\n```sh\n$ kubectl apply -k ./k8s-stateless\n```\n\n7\\) Verify that all pods are in `Running` state:\n\n```sh\n$ kubectl get pods\n```\n\n8\\) Get the NodePort using the service command:\n\n```sh\n$ minikube service stateless-app-service --url\n```\n\n9\\) Browse via HTTP to the address returned (e.g. http://192.168.0.0:12345).\n\n10\\) Stop and delete everything:\n\n```sh\n$ kubectl delete -k ./k8s-stateless\n$ minikube image rm registry.local/stateless-app\n$ minikube stop\n$ minikube delete\n$ docker system prune --all\n```\n\n\u003c/details\u003e\n\n### Known issues\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker use root user/group in host machine\u003c/summary\u003e\n\n1\\) Get your Unix user/group informations:\n\n```sh\n$ id\n```\n\n2\\) Add this to `/etc/subuid`:\n\n```sh\n{USER}:{UID}:1\n...\n```\n\n3\\) Add this to `/etc/subgid`:\n\n```sh\n{USER}:{DOCKER_GUI}:1\n...\n```\n\n4\\) Add this to `/etc/docker/daemon.json`:\n\n```json\n{\n  \"userns-remap\": \"{USER}\"\n} \n```\n\nto enable Docker's user namespace feature.\n\n5\\) Restart Docker engine:\n\n```sh\n$ sudo service docker restart\n```\n\nMore info:\n\n- https://jtreminio.com/blog/running-docker-containers-as-current-host-user/\n- https://www.jujens.eu/posts/en/2017/Jul/02/docker-userns-remap/\n- https://medium.com/faun/set-current-host-user-for-docker-container-4e521cef9ffc\n- https://daten-und-bass.io/blog/docker-user-namespaces-enabling-userns-remap-on-docker-toolbox/\n- https://stackoverflow.com/a/49600083\n\n\u003c/details\u003e\n\n### More info\n\nSee [LINKS](LINKS.md) file.\n\n### Changelog\n\nSee auto-[CHANGELOG](CHANGELOG.md) file.\n\n### Contributing\n\nFor your contributions please use:\n\n- [git-flow workflow](https://danielkummer.github.io/git-flow-cheatsheet/)\n- [conventional commits](https://www.conventionalcommits.org)\n\n### Support\n\n[\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" width=\"200\" alt=\"Buy Me A Coffee\"\u003e](https://buymeacoff.ee/frugan)\n\n### License\n\n(ɔ) Copyleft 2024 [Frugan](https://frugan.it).  \n[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/), see [COPYING](COPYING) file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrugan-dev%2Flbd-xaas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrugan-dev%2Flbd-xaas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrugan-dev%2Flbd-xaas/lists"}