{"id":20313913,"url":"https://github.com/craftcms/image","last_synced_at":"2025-04-11T17:16:52.766Z","repository":{"id":226465503,"uuid":"450099151","full_name":"craftcms/image","owner":"craftcms","description":"Container images that are used as the base for Craft CMS container applications","archived":false,"fork":false,"pushed_at":"2024-12-19T17:08:28.000Z","size":163,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"8.4","last_synced_at":"2025-03-25T13:11:26.288Z","etag":null,"topics":["cms","container","craftcms","docker"],"latest_commit_sha":null,"homepage":"https://craftcms.com","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/craftcms.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":"2022-01-20T13:01:02.000Z","updated_at":"2025-02-12T20:27:46.000Z","dependencies_parsed_at":"2024-12-02T15:42:25.764Z","dependency_job_id":null,"html_url":"https://github.com/craftcms/image","commit_stats":null,"previous_names":["craftcms/image"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftcms","download_url":"https://codeload.github.com/craftcms/image/tar.gz/refs/heads/8.4","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447600,"owners_count":21105140,"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":["cms","container","craftcms","docker"],"created_at":"2024-11-14T18:13:28.743Z","updated_at":"2025-04-11T17:16:52.742Z","avatar_url":"https://github.com/craftcms.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image\n\nThis repository hosts the code for building container images tailored for Craft CMS applications. Our aim is to offer an always up-to-date base image that developers can expand to run a web server of their choice. \n\n\u003e Our base image does not include an NGINX server and is exclusively configured to support running PHP-FPM. This setup enables developers to fully customize their container environments and maximize performance to meet their application needs (e.g. deploy with Caddy instead of NGINX). \n\n## Image\n\nThis repository contains the following image types:\n\n1. `image` - The base image for all other images that installs PHP and creates a non-root user. This image also installs supervisord and NGINX but does not configure NGINX.\n\n## Adding a new service to supervisor\n\nIn order to add a new service to supervisor, follow these steps:\n\n1. Create a new service file ending in `.ini`.\n2. Copy the new file during a build step in the `Dockerfile` (\n   e.g. `COPY ./supervisor.d/craft-worker.ini /etc/supervisor.d/craft-worker.ini`).\n3. Supervisor will automatically pick up the new service and start it.\n\n## Examples\n\nThis repository contains examples for extending the container image to adapt to your use case. The examples are located in the `examples` folder.\n\n## Testing\n\nIn order to test this image locally, follow these steps:\n\n1. Install an app (Craft), into the `examples/nginx/local` folder (the\n   webroot `web` is still expected and not dynamic yet). (_**Note**: If it is easier, create an `index.php`\n   in `./examples/nginx/local/web` with `\u003c?php phpinfo();` to verify configuration_).\n2. Run the `make run` command which is a helper to `docker-compose up -d --build`.\n3. Visit `http://localhost:8080` to verify the installation.\n\n## Customizing PHP Settings\n\nSome PHP settings may be customized by setting environment variables for the image.\n\nIn this example, we’re setting the PHP memory limit to `512M` rather than the default `256M`:\n\n```yaml\nversion: \"3.6\"\nservices:\n  php-fpm:\n    image: ghcr.io/craftcms/image:8.2\n    volumes:\n      - .:/app\n    env_file: .env\n    environment:\n      PHP_MEMORY_LIMIT: 512M\n  # ... nginx and database services\n```\n\n### Customizable Settings\n\n| PHP Setting                       | Environment Variable                  | Default Value |\n| --------------------------------- | ------------------------------------- | ------------- |\n| `memory_limit`                    | `PHP_MEMORY_LIMIT`                    | `256M`        |\n| `max_execution_time`              | `PHP_MAX_EXECUTION_TIME`              | `120`         |\n| `upload_max_filesize`             | `PHP_UPLOAD_MAX_FILESIZE`             | `20M`         |\n| `max_input_vars`                  | `PHP_MAX_INPUT_VARS`                  | `1000`        |\n| `post_max_size`                   | `PHP_POST_MAX_SIZE`                   | `8M`          |\n| `opcache.enable`                  | `PHP_OPCACHE_ENABLE`                  | `1`           |\n| `opcache.revalidate_freq`         | `PHP_OPCACHE_REVALIDATE_FREQ`         | `0`           |\n| `opcache.validate_timestamps`     | `PHP_OPCACHE_VALIDATE_TIMESTAMPS`     | `0`           |\n| `opcache.max_accelerated_files`   | `PHP_OPCACHE_MAX_ACCELERATED_FILES`   | `10000`       |\n| `opcache.memory_consumption`      | `PHP_OPCACHE_MEMORY_CONSUMPTION`      | `256`         |\n| `opcache.max_wasted_percentage`   | `PHP_OPCACHE_MAX_WASTED_PERCENTAGE`   | `10`          |\n| `opcache.interned_strings_buffer` | `PHP_OPCACHE_INTERNED_STRINGS_BUFFER` | `16`          |\n| `opcache.fast_shutdown`           | `PHP_OPCACHE_FAST_SHUTDOWN`           | `1`           |\n\n## Upgrading Ubuntu\n\nIn order to update Ubuntu (e.g. Ubuntu 24.04 was released), follow these steps:\n\n1. Update the `UBUNTU_VERSION` in the `Makefile` to the new version (e.g. `UBUNTU_VERSION=13`). This will update the\n   base image used for the build.\n2. Update the `PHP_VERSION` in the `Makefile` to the new version (e.g. `PHP_VERSION=8.2`). This will update the\n   PHP version installed in the image.\n3. Then, run `make build` to rebuild the image to test locally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftcms%2Fimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fimage/lists"}