{"id":21493389,"url":"https://github.com/microdevops-com/php-project-proto","last_synced_at":"2025-08-04T14:39:27.953Z","repository":{"id":46037929,"uuid":"208290193","full_name":"microdevops-com/php-project-proto","owner":"microdevops-com","description":"Prototype for PHP Project with GitLab Pipeline, docker-compose.yml, docker images","archived":false,"fork":false,"pushed_at":"2025-07-02T12:33:01.000Z","size":53,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-16T13:22:06.014Z","etag":null,"topics":["docker","docker-compose","gitlab-ci","php","wsl"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microdevops-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2019-09-13T15:12:57.000Z","updated_at":"2025-07-02T12:33:04.000Z","dependencies_parsed_at":"2025-07-02T13:29:41.423Z","dependency_job_id":"752f5629-91b2-4867-853c-bac590efc883","html_url":"https://github.com/microdevops-com/php-project-proto","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/microdevops-com/php-project-proto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fphp-project-proto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fphp-project-proto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fphp-project-proto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fphp-project-proto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microdevops-com","download_url":"https://codeload.github.com/microdevops-com/php-project-proto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fphp-project-proto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268713169,"owners_count":24295062,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docker","docker-compose","gitlab-ci","php","wsl"],"created_at":"2024-11-23T15:42:17.802Z","updated_at":"2025-08-04T14:39:27.901Z","avatar_url":"https://github.com/microdevops-com.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-project-proto\nPrototype for PHP Project with GitLab Pipeline, docker-compose.yml, docker images etc.\nReady to use for local development on Linux, Mac, Windows and remote deploy via GitLab.\n\n# Local Development\n\n## Windows\n\n### Docs and Links\n- https://docs.microsoft.com/en-us/windows/wsl/install-win10\n- https://docs.docker.com/docker-for-windows/wsl/\n- https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n- https://blog.jetbrains.com/phpstorm/2020/06/phpstorm-2020-1-2-is-released/\n\n### Docker Setup\n[Check Windows 10 version requirement](https://docs.microsoft.com/en-us/windows/wsl/install-win10#update-to-wsl-2): Running Windows 10, updated to version 1903 or higher, Build 18362 or higher for x64 systems.\n\n[Setup Docker version 2.3.0.5+.](https://docs.docker.com/docker-for-windows/install/) with WSL 2 enabled.\n\nReboot Windows, run Docker, allow WSL 2 kernel to be updated and restart Docker service for Windows.\nAlso kernel could be [updated](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) [manually](https://pureinfotech.com/install-windows-subsystem-linux-2-windows-10/).\n\nCheck Docker in `cmd.exe`:\n- `docker ps` should work and show empty list.\n- `docker-compose` should give help.\n- `docker run --rm -it alpine sh` should run test Alpine image shell.\n\nCheck once again in Docker service settings (via tray icon menu) that WSL 2 is enabled and via `cmd.exe` that VERSION 2 is used for Docker:\n```\nwsl --list --verbose\n```\n\n### Ubuntu in WSL Setup\nRun `powershell.exe` as Admin.\n\nEnable Virtual Machine Platform.\n```\ndism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart\n```\n\nCheck WSL installed:\n```\nEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux\n```\n\nDownload Ubuntu 20 package omitting MS Store:\n```\nInvoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing\n```\n\nInstall Ubuntu 20 WSL package:\n```\nAdd-AppxPackage .\\Ubuntu.appx\n```\n\nRun Ubuntu from Start menu.\n\nGive Ubuntu username and password.\n\nRun new Powershell window again.\n\nSet default WSL version to 2:\n```\nwsl --set-version Ubuntu-20.04 2\nwsl --set-default-version 2\nwsl --list --verbose\n```\n\n### Link Ubuntu and Docker\nGo to Docker service settings via tray icon, select Resources, WSL Integration, enable it for Ubuntu 20.\n\nApply and restart Docker service.\n\nOpen `cmd.exe` as Admin and set Ubuntu as default WSL app:\n```\nwsl --set-default Ubuntu-20.04\n```\n\n### Setup Ubuntu dev env:\nOpen Ubuntu bash shell via Start.\n\nUpdate Ubuntu:\n```\nsudo apt update\nsudo apt upgrade\nsudo apt dist-upgrade\n```\n\nSetup needed utils:\n```\nsudo apt install git mc vim nano build-essential apt-transport-https ca-certificates curl software-properties-common\n```\n\nSetup git if needed:\n```\ngit config --global user.email \"you@example.com\"\ngit config --global user.name \"Your Name\"\n```\n\nSetup docker cli and docker-compose:\n```\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\nsudo apt-get update -y\nsudo apt-get install -y docker-ce-cli docker-compose\n```\n\nAllow your user to use docker without sudo:\n```\nsudo usermod -aG docker $USER\n```\n\nSetup mount of Windows disk with correct permissions. Add this to the `/etc/wsl.conf` file:\n```\n[automount]\nenabled = true\noptions = \"metadata,umask=22,fmask=11\"\nmountFsTab = false\n```\n\nInstall symfony cli:\n```\nwget https://get.symfony.com/cli/installer -O - | sudo bash\nsudo mv /root/.symfony5/bin/symfony /usr/local/bin/symfony\n```\n\nInstall php cli with demo symfony project deps:\n```\nsudo apt install php8.1-cli php8.1-sqlite3 php8.1-mbstring php8.1-xml\n```\n\nInstall composer:\n```\ncurl -s https://getcomposer.org/installer | sudo php\nsudo mv composer.phar /usr/local/bin/composer\n```\n\nRestart Windows.\n\n### Symfony Demo Test\nOpen Ubuntu bash shell.\n\nOptionally change dir to your Windows home dir subfolder which is more convinient to open with your IDE.\n```\ncd /mnt/c/Users/USER/SomeDir\n```\n\nDecide project name and make dir for it:\n```\nexport MY_PRJ=symfony-demo\nmkdir $MY_PRJ\ncd $MY_PRJ\n```\n\nSetup symfony demo (or other symfony project type):\n```\nsymfony new --demo . # demo\n#symfony new --webapp . # webapp\n#symfony new . # cli or microservice\n```\n\nGet project this project proto or pull new code:\n```\n(cd .. \u0026\u0026 cd php-project-proto \u0026\u0026 git pull || git clone https://github.com/sysadmws/php-project-proto)\n```\n\nCopy needed files from project proto:\n```\ncat ../php-project-proto/.env.addons | envsubst \u003e\u003e .env\ncat ../php-project-proto/.gitignore \u003e\u003e .gitignore\ncp -R ../php-project-proto/.docker/ ../php-project-proto/.gitlab-ci.yml ../php-project-proto/Makefile ../php-project-proto/docker-compose.yml ../php-project-proto/uid.sh .\n```\n\nOptionally delete the symfony's docker files\n```\nrm docker-compose.override.yml\n```\n\nBuild and run project:\n```\nmake build\nmake up\n```\n\nOther make commands help:\n```\nmake help\n```\n\nAccept Windows firewall exceptions from Docker service. They will come with when containers run.\n\nOpen project services in Windows browser to check:\n- [Symfony Demo](http://localhost)\n- [phpinfo](http://localhost/_profiler/phpinfo)\n- [RabbitMQ Admin](http://localhost:15672/)\n\n# GitLab CI Setup\nInstall submodule:\n```\ngit submodule add --name .gitlab-ci-functions -b master -- https://github.com/sysadmws/gitlab-ci-functions .gitlab-ci-functions\n```\n\nSubstitute `__RUNNER_TAG__` with needed runner tag.\n\nSet vars `DEPLOY_DOCKER_SERVER`, `DEPLOY_NGINX_SERVER`, `DEPLOY_URL`, `DEPLOY_APP` for CI for scope `proto` or change `proto` env in CI for something else.\n\n# Push project to GitLab\nThe project dir should be already initialized as Git repo.\n\nAdd `git remote` remotes and push.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrodevops-com%2Fphp-project-proto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrodevops-com%2Fphp-project-proto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrodevops-com%2Fphp-project-proto/lists"}