{"id":22083630,"url":"https://github.com/dockerbound-immortal/php-api-microservice","last_synced_at":"2026-05-08T10:32:23.566Z","repository":{"id":202140610,"uuid":"421964335","full_name":"Dockerbound-Immortal/PHP-API-Microservice","owner":"Dockerbound-Immortal","description":"Containers for building a backend PHP API microservice.","archived":false,"fork":false,"pushed_at":"2021-10-27T20:29:52.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T23:43:24.828Z","etag":null,"topics":["docker-containers","nginx","php8","postgres"],"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/Dockerbound-Immortal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-10-27T20:28:08.000Z","updated_at":"2021-10-27T20:42:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"80a39777-95ab-4cc8-9e64-631e49710502","html_url":"https://github.com/Dockerbound-Immortal/PHP-API-Microservice","commit_stats":null,"previous_names":["dockerbound-immortal/php-api-microservice"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/Dockerbound-Immortal/PHP-API-Microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dockerbound-Immortal%2FPHP-API-Microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dockerbound-Immortal%2FPHP-API-Microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dockerbound-Immortal%2FPHP-API-Microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dockerbound-Immortal%2FPHP-API-Microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dockerbound-Immortal","download_url":"https://codeload.github.com/Dockerbound-Immortal/PHP-API-Microservice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dockerbound-Immortal%2FPHP-API-Microservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32776641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-containers","nginx","php8","postgres"],"created_at":"2024-12-01T00:16:43.794Z","updated_at":"2026-05-08T10:32:23.546Z","avatar_url":"https://github.com/Dockerbound-Immortal.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Backend API Microservice\nA simplified Docker Compose workflow that sets up a network of containers for local development. You can view the full article that inspired this repo [here](https://dev.to/aschmelyun/the-beauty-of-docker-for-local-laravel-development-13c0).\n\n## Usage\n\nTo get started, make sure you have [Docker installed](https://docs.docker.com/docker-for-mac/install/) on your system, and then clone this repository.\n\nNext, navigate in your terminal to the directory you cloned this, and spin up the containers for the web server by running `docker-compose up --build -d site`.\n\nAfter that completes, follow the steps from the [src/README.md](src/README.md) for setting up the authors project, or create your own README instructions specific to your project build.\n\nBringing up the Docker Compose network with `site` instead of just using `up`, ensures that only our site's containers are brought up at the start, instead of all of the command containers as well. The following are built for our web server, with their exposed ports detailed:\n\n- **webserver** - `:8080`\n- **database** - `:5432`\n- **api** - `:9000`\n\n## Persistent Storage\n\nBy default, whenever you bring down the Docker network, your data will be removed after the containers are destroyed. If you would like to have persistent data that remains after bringing containers down and back up, do the following:\n\n1. Create a `dbdata` folder in the `infrastructure` root.\n2. Under the database service in your `docker-compose.yml` file, add the following lines:\n\n```\nvolumes:\n  - ./dbdata:/path/to/database/data\n```\n\n# Accessing Postgres\n\nUnlike our MySQL containers, our Postgres containers\ndo not come with a DBMS container. We recommend setting\nup DataGrip to connect to the database, you can access the\npostgres container via `docker exec -ti webserver sh` once inside the container you can access the data base as you would in a normal environment `psql@databaseName`.\n\nWhile it is possible to manage the database in this manner, \nit can be tedious and difficult to manage. PGAdmin is a \nfree tool, however, we prefer DataGrip. If you wish to \nadd a PGAdmin container you can add a service to the \ndocker-compose from the official [docker hub image](https://www.pgadmin.org/download/pgadmin-4-container/).\n\n# Issues\n\n## Server Error 500\n\u003e exec into php container: docker exec -ti php sh\n\n\u003e install dependencies: composer install \n\n\u003e run node install: docker run --rm node install\n\n## Unable to access storage\n\u003e exec into php container: docker exec -ti php sh\n\n\u003e change ownership: \n\u003ccode\u003echown -R www-data: storage\u003c/code\u003e\n\u003ccode\u003echown -R www-data: bootstrap/cache\u003c/code\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockerbound-immortal%2Fphp-api-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdockerbound-immortal%2Fphp-api-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockerbound-immortal%2Fphp-api-microservice/lists"}