{"id":15698203,"url":"https://github.com/zofe/minidocker","last_synced_at":"2025-10-16T02:32:01.681Z","repository":{"id":149363013,"uuid":"282504415","full_name":"zofe/minidocker","owner":"zofe","description":"minimal docker for PHP/Laravel development, based on alpine images of nginx, php, mariadb ~ 100 MB","archived":false,"fork":false,"pushed_at":"2023-02-25T13:58:59.000Z","size":14,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T14:21:51.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/zofe.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":"2020-07-25T18:43:01.000Z","updated_at":"2025-02-08T20:17:54.000Z","dependencies_parsed_at":"2023-09-03T18:23:05.402Z","dependency_job_id":null,"html_url":"https://github.com/zofe/minidocker","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/zofe%2Fminidocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zofe%2Fminidocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zofe%2Fminidocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zofe%2Fminidocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zofe","download_url":"https://codeload.github.com/zofe/minidocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666834,"owners_count":21624379,"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-10-03T19:23:51.934Z","updated_at":"2025-10-16T02:31:56.635Z","avatar_url":"https://github.com/zofe.png","language":"Dockerfile","readme":"## Minidocker \n\nminimal docker setup for PHP development (i.e. Laravel projects),\nit start from alpine images:   \n- nginx(1.13)  \n- php-fpm (8.1)\n- mariadb (latest)\n\nThe idea is to keep all images really small and ready to run on small basic vps:\n\n```\n.. minidocker_nginx      ..  21 MB  \n.. minidocker_mariadb_   ..  44 MB\n.. minidocker_php-fpm    ..  93 MB\n```\n\n### configurations\ncopy and paste __.env.example__ to __.env__ and change as you need\n```.dotenv\nCOMPOSE_PROJECT_NAME=minidocker\nCOMPOSE_FILE=docker-compose.yml\n\nVIRTUAL_HOST=minidocker.local\nEMAIL=me@minidocker.local\nPROXY_NETWORK=nginx-proxy\n\nMYSQL_BIND_PORT=33060\nNGNIX_BIND_PORT=80\n\nNGINX_TEMPLATE=docker/nginx/nginx.conf\n\nLETSENCRYPT_HOST=\"${VIRTUAL_HOST}\"\nLETSENCRYPT_EMAIL=\"${EMAIL}\"\n\nDB_DATABASE=minidocker_db\nDB_USERNAME=minidocker\nDB_PASSWORD=minidocker\nDB_ROOT_PASSWORD=root\n\n```\n\n\n\n### usage\n\n- fork or download the repo \n- then raise docker containers (nginx, php, mariadb)\n\n```\ndocker-compose up -d\n```\n\n- then enter in php-fpm container\n\n```\ndocker-compose exec php-fpm bash\n```\n\n- you can run a simple phpinfo() \n```\nmkdir public \u0026\u0026 echo '\u003c?php phpinfo();' \u003e /application/public/index.php \u0026\u0026 chown -R www-data.www-data /application/public/\n\n```\n\nthen you can check if all is working using\n\nhttp://localhost:80 \n\n\n### laravel sandbox\n\n- you can download, install and run laravel \n\n```\nrm /application/.gitkeep\ncomposer create-project --prefer-dist laravel/laravel /application\nchown -R www-data.www-data /application\n\n```\nIf you use laravel edit the default /application/.env to match your DB config ie:\n```dotenv\n...\nDB_HOST=mariadb\nDB_PORT=3306\nDB_DATABASE=minidocker_db\nDB_USERNAME=minidocker\nDB_PASSWORD=minidocker\n...\n```\n \n\nYou should be ready to develop your app in __/application__\n\nYou can define in application a \"submodule\" or just instance a new git project with your web application.\n \n\n\n\n\n### production\n\nI also added a .env.prod as alternative to .env.example for \"production\" or \"stage\" servers.  \nIt's useful for:\n\n- use https instead http (with a real hostname... Let's Encrypt certificate etc..)\n- use a different network for containers (I usually usa a nginx reverse proxy) \n- different port mapping \n\n\nbye,\nFelice\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzofe%2Fminidocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzofe%2Fminidocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzofe%2Fminidocker/lists"}