{"id":22458137,"url":"https://github.com/electrobayan/docker-nginx-php8.1-maria10.4-phpmyadmin5.0.1","last_synced_at":"2026-01-06T18:04:20.135Z","repository":{"id":257793350,"uuid":"595064869","full_name":"electrobayan/docker-nginx-php8.1-maria10.4-phpmyadmin5.0.1","owner":"electrobayan","description":"Slim and other frameworks Docker compose image","archived":false,"fork":false,"pushed_at":"2023-01-30T16:05:07.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T18:13:34.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/electrobayan.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":"2023-01-30T10:17:34.000Z","updated_at":"2023-01-30T10:18:16.000Z","dependencies_parsed_at":"2024-09-24T20:06:38.862Z","dependency_job_id":null,"html_url":"https://github.com/electrobayan/docker-nginx-php8.1-maria10.4-phpmyadmin5.0.1","commit_stats":null,"previous_names":["electrobayan/docker-nginx-php8.1-maria10.4-phpmyadmin5.0.1"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electrobayan","download_url":"https://codeload.github.com/electrobayan/docker-nginx-php8.1-maria10.4-phpmyadmin5.0.1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858562,"owners_count":20684054,"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-12-06T08:11:03.257Z","updated_at":"2026-01-06T18:04:20.051Z","avatar_url":"https://github.com/electrobayan.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Docker Image\r\nStack:\r\n- Nginx\r\n- PHP FPM 8.1\r\n- Maria DB 10.4\r\n- Phpmyadmin 5.0.1\r\n\r\n## How to use\r\n\r\n### Test run:\r\n1) Install Docker and Docker compose\r\n2) Clone the repository to your local machine\r\n3) Prepare .env file. Just copy .env.dist file\r\n4) Modify your hosts file by adding these two lines or your own:\r\n```\r\n127.0.0.1 hello.loc\r\n127.0.0.1 phpmyadmin.loc\r\n```\r\n5) Run ``docker compose up -d`` from the root folder you just cloned\r\n6) Go ``http://hello.loc/`` to see PHP info default page or ``http://phpmyadmin.loc`` to see phpmyadmin panel to wor with databases\r\n\r\n### Create your domains:\r\n7) Create your own hosts for further work based on ``./hosts/hello-loc.conf``. Just copy it, rename and modify and edit. Example:\r\n```\r\nserver {\r\n    index index.php;\r\n    server_name my-new-project.loc;\r\n    error_log  /var/log/nginx/error.log;\r\n    access_log /var/log/nginx/access.log;\r\n    root /var/www/my-new-project.loc;\r\n\r\n    location ~ \\.php$ {\r\n        try_files $uri =404;\r\n        fastcgi_split_path_info ^(.+\\.php)(/.+)$;\r\n        fastcgi_pass php:9000;\r\n        fastcgi_index index.php;\r\n        include fastcgi_params;\r\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n        fastcgi_param PATH_INFO $fastcgi_path_info;\r\n    }\r\n}\r\n```\r\n8) Don't forget to add your new domain ``my-new-project.loc`` to your computer **hosts** file\r\n9) Go ``http://my-new-project.loc/`` to see your project\r\n\r\n## Bonus\r\nUse make scripts saved into ``Makefile`` to make your live easier :)\r\n1) Install make ``sudo apt install make``\r\n2) To use script just use it like that from your docker compose root directory where `p` is your project name folder in `www`: \r\n```\r\nmake composer_i p=hello.loc\r\n```\r\nPlease, find the full list of command in the ``Makefile``\r\n\r\n### ...or another option is to:\r\nAdd these bash scripts to your ``.bashrc`` files. Function name can be any you like.\r\n\r\nEnter your PHP container via CLI. \r\nPlease, note that your container name MUST contain ``php-`` in the grep part. \r\n```\r\nenterServer(){\r\n    docker exec -it $(docker ps --format \"{{.Names}}\" | grep \"php-\") bash\r\n}\r\n```\r\n\r\nStop all running containers:\r\n``\r\nstopAllContainers(){\r\n    docker stop $(docker ps -q)\r\n}\r\n``\r\n\r\nRun ``composer install`` for a particular project. \r\nPass your project folder name as an argument. Example ``composerInstall hello.loc``\r\nPlease, note that your container name MUST contain ``php-`` in the grep part.\r\n```\r\ncomposerInstall(){\r\n    docker exec -i $(docker ps --format \"{{.Names}}\" | grep \"php-\") composer install --working-dir=/var/www/$1\r\n}\r\n```\r\n\r\nImport the database where you should pass:\r\n1) You MySQL/MariaDb container name\r\n2) Your database name\r\n3) Your dump path\r\n```\r\nimportDb(){\r\n    docker exec -i $1 mysql -uroot -proot $2 \u003c $3\r\n}\r\n```\r\n\r\nExport the database where you should pass:\r\n1) You MySQL/MariaDb container name\r\n2) Your database name\r\n```\r\nexportDb(){\r\n    docker exec -i $1 mysqldump -uroot -proot $2 | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\\*/\\*/' | gzip \u003e $2.sql.gz\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrobayan%2Fdocker-nginx-php8.1-maria10.4-phpmyadmin5.0.1/lists"}