{"id":30722643,"url":"https://github.com/talpx1/laravel-environment-installer","last_synced_at":"2025-09-03T11:10:03.179Z","repository":{"id":311147314,"uuid":"1042202606","full_name":"Talpx1/laravel-environment-installer","owner":"Talpx1","description":"A Docker powered Laravel environment that works for both dev and production","archived":false,"fork":false,"pushed_at":"2025-08-22T10:58:29.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-22T12:41:22.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/Talpx1.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,"zenodo":null}},"created_at":"2025-08-21T16:34:53.000Z","updated_at":"2025-08-22T10:58:32.000Z","dependencies_parsed_at":"2025-08-22T12:57:00.888Z","dependency_job_id":null,"html_url":"https://github.com/Talpx1/laravel-environment-installer","commit_stats":null,"previous_names":["talpx1/laravel-environment-installer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Talpx1/laravel-environment-installer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talpx1%2Flaravel-environment-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talpx1%2Flaravel-environment-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talpx1%2Flaravel-environment-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talpx1%2Flaravel-environment-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Talpx1","download_url":"https://codeload.github.com/Talpx1/laravel-environment-installer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talpx1%2Flaravel-environment-installer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273431477,"owners_count":25104511,"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-09-03T02:00:09.631Z","response_time":76,"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":[],"created_at":"2025-09-03T11:09:58.325Z","updated_at":"2025-09-03T11:10:03.128Z","avatar_url":"https://github.com/Talpx1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Environment Installer\n\nThis installer aims to provide a plug-and-play Docker-based Laravel environment that works both for dev and production.\n\n# Requirements\n\n- A [Laravel installation](https://laravel.com/docs/installation)\n- [Docker](https://www.docker.com/)\n\n## Installation\n\nFirst, after installing Laravel, setup your `.env` file.\n\nThen run the following command in the root folder of your Laravel project.\n\n```bash\nmkdir -p laravel-environment-installer \u0026\u0026 \\\ncurl -sL https://github.com/Talpx1/laravel-environment-installer/archive/refs/heads/main.tar.gz | \\\ntar xz --strip=1 -C laravel-environment-installer \u0026\u0026 \\\nbash ./laravel-environment-installer/install.bash\n```\n\n## What is provided\n### !!! TO-DO !!!\n- devcontainer with Laravel and [Filament](https://filamentphp.com/) extensions preconfigured\n- [GitHub action](https://github.com/features/actions) for image build and push to [DockerHub](https://hub.docker.com/)\n- Docker image with:\n\n  - [PHP](https://www.php.net/)\n  - Webserver ([apache](https://httpd.apache.org/))\n  - [Supervisord](https://supervisord.org/)\n  - Cron for [Laravel scheduler](https://laravel.com/docs/12.x/scheduling#running-the-scheduler)\n  - Workers for [Laravel queues](https://laravel.com/docs/queues#supervisor-configuration)\n  - [Logrotate](https://linux.die.net/man/8/logrotate) for log management\n  - [Opcache](https://www.php.net/manual/it/book.opcache.php)\n  - [Vite](https://vite.dev/) watcher to detect file changes (since no dev server will be running)\n  - Healtcheck script\n  - Post update script for [Watchtower](https://containrrr.dev/watchtower/) lifecycle hook (run migrations, optimize, ...)\n\n- dockerignore\n- env vars configuration\n- docker-compose for dev (see below for a production version you can use on your server)\n\n# Deployment\n\nin your project repo, you should setup the following secrets, to allow your ci action to push on DockerHub:\n\n- DOCKERHUB_USERNAME\n- DOCKERHUB_TOKEN\n- DOCKERHUB_REPO_NAME\n\nYou will also need a docker-compose on the server to serve your app.  \nAn example of server-side docker-compose is provided below:\n\n```yaml\nservices:\n  app:\n    image: \u003cyour_dockerhub_user\u003e/\u003cyour_dockerhub_repo\u003e:\u003ctag\u003e\n    labels:\n      - \"com.centurylinklabs.watchtower.enable=true\"\n      - \"com.centurylinklabs.watchtower.scope=\u003cyour_app_slug\u003e\"\n      - \"com.centurylinklabs.watchtower.lifecycle.post-update='/post-update.sh'\"\n      - \"com.centurylinklabs.watchtower.lifecycle.post-update-timeout=0\"\n    ports:\n      - \"${APP_PORT:-80}:80\"\n      - \"${VITE_PORT:-5173}:${VITE_PORT:-5173}\"\n    volumes:\n      - \".env:/var/www/html/.env\"\n    networks:\n      - \u003cyour_app_slug\u003e\n    restart: unless-stopped\n    depends_on:\n      - mariadb\n    healthcheck:\n      test: [\"CMD\", \"/healthcheck.sh\"]\n      interval: 30s\n      timeout: 5s\n      retries: 3\n      start_period: 10s\n  mariadb:\n    image: \"mariadb:10\"\n    ports:\n      - \"${FORWARD_DB_PORT:-3306}:3306\"\n    restart: unless-stopped\n    environment:\n      MYSQL_ROOT_PASSWORD: \"${DB_PASSWORD}\"\n      MYSQL_ROOT_HOST: \"%\"\n      MYSQL_DATABASE: \"${DB_DATABASE}\"\n      MYSQL_USER: \"${DB_USERNAME}\"\n      MYSQL_PASSWORD: \"${DB_PASSWORD}\"\n      MYSQL_ALLOW_EMPTY_PASSWORD: \"yes\"\n    volumes:\n      - \"\u003cyour_app_slug\u003e_mariadb:/var/lib/mysql\"\n    networks:\n      - \u003cyour_app_slug\u003e\n    healthcheck:\n      test:\n        - CMD\n        - mysqladmin\n        - ping\n        - \"-p${DB_PASSWORD}\"\n      retries: 3\n      timeout: 5s\n  meilisearch:\n    image: \"getmeili/meilisearch:latest\"\n    ports:\n      - \"${FORWARD_MEILISEARCH_PORT:-7700}:7700\"\n    restart: unless-stopped\n    environment:\n      MEILI_NO_ANALYTICS: \"${MEILISEARCH_NO_ANALYTICS:-false}\"\n    volumes:\n      - \"\u003cyour_app_slug\u003e_meilisearch:/meili_data\"\n    networks:\n      - \u003cyour_app_slug\u003e\n    healthcheck:\n      test:\n        - CMD\n        - wget\n        - \"--no-verbose\"\n        - \"--spider\"\n        - \"http://localhost:7700/health\"\n      retries: 3\n      timeout: 5s\n  watchtower:\n    image: containrrr/watchtower\n    labels:\n      - \"com.centurylinklabs.watchtower.scope=\u003cyour_app_slug\u003e\"\n    restart: always\n    container_name: \u003cyour_app_slug\u003e_watchtower\n    environment:\n      - WATCHTOWER_CLEANUP=true\n      - WATCHTOWER_LABEL_ENABLE=true\n      - WATCHTOWER_LIFECYCLE_HOOKS=true\n      - TZ=Europe/Rome\n      - REPO_USER=\u003cyour_dockerhub_user\u003e\n      - REPO_PASS=\u003cyour_dockerhub_token\u003e\n    command: --interval 30 --scope \u003cyour_app_slug\u003e\n    networks:\n      - \u003cyour_app_slug\u003e\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\nnetworks:\n  \u003cyour_app_slug\u003e:\n    driver: bridge\nvolumes:\n  \u003cyour_app_slug\u003e_mariadb:\n    driver: local\n  \u003cyour_app_slug\u003e_meilisearch:\n    driver: local\n```\n\nnote that a .env file must be placed in the same directory, on the server, of the given docker-compose.\n\n# Logs\n\nThe logs will be placed in `/var/www/html/storage/logs` and will be auto-rotated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalpx1%2Flaravel-environment-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalpx1%2Flaravel-environment-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalpx1%2Flaravel-environment-installer/lists"}