{"id":18659012,"url":"https://github.com/delboy1978uk/lamp","last_synced_at":"2025-04-11T20:30:46.311Z","repository":{"id":50376321,"uuid":"81724030","full_name":"delboy1978uk/lamp","owner":"delboy1978uk","description":"Docker LAMP stack","archived":false,"fork":false,"pushed_at":"2024-08-15T11:56:02.000Z","size":430,"stargazers_count":22,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T17:48:25.470Z","etag":null,"topics":["docker","docker-machine","httpd","lamp","mailhog","mariadb","mysql","php","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delboy1978uk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-02-12T12:24:31.000Z","updated_at":"2024-08-15T11:56:05.000Z","dependencies_parsed_at":"2024-11-07T07:51:16.802Z","dependency_job_id":null,"html_url":"https://github.com/delboy1978uk/lamp","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delboy1978uk%2Flamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delboy1978uk%2Flamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delboy1978uk%2Flamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delboy1978uk%2Flamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delboy1978uk","download_url":"https://codeload.github.com/delboy1978uk/lamp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248476125,"owners_count":21110214,"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":["docker","docker-machine","httpd","lamp","mailhog","mariadb","mysql","php","php8"],"created_at":"2024-11-07T07:35:21.729Z","updated_at":"2025-04-11T20:30:46.002Z","avatar_url":"https://github.com/delboy1978uk.png","language":"PHP","readme":"# abandoned\nPlease use https://github.com/boneframework/lamp instead\n\nlamp \n====\n\nA Dockerised LAMP stack\n\n - Docker based Linux server\n - Apache with self signed SSL certificate\n - MariaDB\n - PHP 8.1 and modules (see https://github.com/delboy1978uk/dockerhub/blob/master/php81/Dockerfile)\n - MailHog (port 1025 send, port 8025 in browser)\n - NodeJs 18\n \n If you've never used Docker before, see the instructions below.code\n \n### setup\nThere is a placeholder `public/index.php` in the `code` directory, from which Apache serves your site. You can delete that, and drop in (or symlink) your existing projects into the `code` directory.\n\nIf you are using the `feature/react` branch of this repository, note that the PHP code will go in `code/backend` and not just code, and the react app will go in `code/frontend`.\n \n### starting the server\nSimply `cd` into the folder you cloned into and type\n```\nbin/start\n``` \nApache logs etc will scroll by, leave this terminal open while you do your work. \n\nYou can browse to `https://localhost`, or `https://awesome.scot` (if you added to your `/etc/hosts`, see below, you can customise this domain)\n\n### running CLI commands\nTo run commands such as composer from the terminal that are in your Docker box, you can use the run command:\n```\nbin/run composer install\n```\nTo run npm or npx from the node container you can call `runnode`:\n```\nrunnode npm ci --save-all\n```\nIf you would like to enter the container and run commands from inside, you can type:\n```\nbin/terminal [service]\n```\nTo restart any service, call the following:\n```\nbin/restart [service]\n```\nIf you change the docker config (see belw), you can quickly rebuild using this:\n```\nbin/rebuild\n```\nFinally, there is an empty script which you can use to perform any of your initial setup tasks, typical examples \ncould include running composer install, performing database migrations, populating fixtures,  and warming up caches.\n```\nbin/init\n```\n### stopping the server\nWhen you are finished your work, you can close any bash terminals down until you are left with the one running the server \nand displaying the logs. Press `CTRL-C` to quit, then run the following to tidy up.\n```\nbin/stop\n```\n ### virtual host\n Apache is set up to serve `awesome.scot` with a self signed SSL certificate in your browser (or you can change the name in `docker-compose.yml` and rebuild)\n Edit your `/etc/hosts` file on your computer (`C:\\Windows\\system32\\drivers\\etc\\hosts` on Windows), adding this line:\n ```\n 127.0.0.1 awesome.scot\n ```\n### customising the setup\nYou customise the setup if you need to. PHP and Apache Dockerfiles can be found in the `build` folder. \n\nYou will notice a file named ssmtp.conf. This LAMP stack uses Mailhog, so you can check all would-have-been-sent emails \nby going to `awesome.scot:8025`.\n\nThere is a `.env` file which you add to\n\nWhen connecting to the dev DB from php, the MySQL host should be set to `mariadb` and not 127.0.0.1 or localhost.\n\nNow you've configured your stuff, we use Docker's compose command to build it first. This is a one off again.\n```\nbin/rebuild\n```\n\nAfter which, we can just tell it `bin/start`. \n\n### handy tip\nA handy tip, if you edit your `~/.bashrc`, you should add the following line: \n```\nexport PATH=$PATH:bin:vendor/bin\n```\nThis is also in the PHP container. It allows you to run a command without putting `bin/` or `vendor/bin` before it.\n```\nvendor/bin/phpunit     // without $PATH export \nphpunit                // with $PATH export \n                       \nbin/start              // without $PATH export\nstart                  // with $PATH export   \n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelboy1978uk%2Flamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelboy1978uk%2Flamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelboy1978uk%2Flamp/lists"}