{"id":22397150,"url":"https://github.com/putyourlightson/craft-coding-challenge-13","last_synced_at":"2026-01-06T17:05:05.881Z","repository":{"id":193464709,"uuid":"688838794","full_name":"putyourlightson/craft-coding-challenge-13","owner":"putyourlightson","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-12T08:52:19.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-19T11:21:18.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Twig","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/putyourlightson.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":"2023-09-08T08:01:08.000Z","updated_at":"2023-09-08T08:55:53.000Z","dependencies_parsed_at":"2023-09-08T10:08:24.338Z","dependency_job_id":null,"html_url":"https://github.com/putyourlightson/craft-coding-challenge-13","commit_stats":null,"previous_names":["putyourlightson/craft-coding-challenge-13"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-coding-challenge-13","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-coding-challenge-13/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-coding-challenge-13/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putyourlightson%2Fcraft-coding-challenge-13/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/putyourlightson","download_url":"https://codeload.github.com/putyourlightson/craft-coding-challenge-13/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245750369,"owners_count":20666165,"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-05T06:11:00.345Z","updated_at":"2026-01-06T17:05:00.835Z","avatar_url":"https://github.com/putyourlightson.png","language":"Twig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Challenge #13 – Get your Ducks in a Row\n\n![Ducks in a row](https://cms.craftcodingchallenge.com/assets/images/_banner/ducks-in-a-row-foc.jpg)\n\nView the challenge description at:  \nhttps://www.craftcodingchallenge.com/challenge-13-get-your-ducks-in-a-row\n\nThis repo extends the stellar [Spin Up Craft](https://github.com/nystudio107/spin-up-craft) template repo by @nystudio107.\n\n## Work on the challenge in a browser via GitHub Codespaces\n\n1. Click this button:\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=688838794)\n2. In the resulting Terminal window, type `make dev` to start the project up\n3. Wait until you see output like this, and then access the site via the credentials that are output on the console:\n\n```\nphp_1    | ### Your Craft site is ready!\nphp_1    | Frontend URL: https://laughing-space-zebra-xg9qxvqjpqhp5qx-8050.preview.app.github.dev/\nphp_1    | CP URL: https://laughing-space-zebra-xg9qxvqjpqhp5qx-8050.preview.app.github.dev/admin\nphp_1    | CP User: admin\nphp_1    | CP Password: project\n```\n\nThis lets anyone use the project without having to do _any_ local setup.\n\nYou can use the Codespaces editor to edit Twig files, load the site frontend, or log into the Craft CP, all from within a browser!\n\nThe first time you start up your project in Codespaces, it'll take some time to set everything up. However, subsequent startups will be very quick.\n\nYou can access your existing Codespaces here:\n\nhttps://github.com/codespaces\n\nClick on one to resume it. If you don't see a Terminal window, go to the hamburger  menu in the top-left, and click on **Terminal \u003e New Terminal**\n\nYou are limited to 15 active Codespaces on the free plan, but you can go in and delete any older Codespaces you're not using at any time.\n\n## Work on the challenge in local dev\n\n1. Have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed\n2. Clone this repository down.\n3. `cd` to your repo in your terminal\n4. Get the project up and running with `make dev`\n5. Wait until you see output like this, and then access the site via the credentials that are output on the console:\n\n```\ncraft-coding-challenge-XY-php-1    | ### Your Craft site is ready!\ncraft-coding-challenge-XY-php-1    | Frontend URL: http://localhost:8050/\ncraft-coding-challenge-XY-php-1    | CP URL: http://localhost:8050/admin\ncraft-coding-challenge-XY-php-1    | CP User: admin\ncraft-coding-challenge-XY-php-1    | CP Password: project\n```\n\nHit `Control-C` to terminate the project and spin down the containers\n\nThe first time you start up your project, it'll take some time to set everything up. However, subsequent startups will be very quick.\n\nThis repo extends the stellar https://github.com/nystudio107/spin-up-craft by @nystudio107, documented below.\n\n# Spin Up Craft\n\nAllows you to create your own self-contained Craft CMS project complete with a seeded database, template files, assets, and devops shrink-wrapped with Docker, which you can distribute to others or use yourself.\n\nUse it for:\n- Spinning up a Craft CMS site in a browser in Github Codespaces\n- Shipping a self-contained Craft CMS site to others\n- Providing working example code \u0026 projects to others\n- Spinning up a local Craft project using someone else's `composer.json` \u0026 database, for support\n\n**N.B.:** This is _not_ intended to be a fully functional local development environment for client sites (there is no `buildchain`, for example).\n\n## Making a new Craft CMS project\n\nThis is a template repository. Click on **Use this template** on [github](https://github.com/nystudio107/spin-up-craft) and select **Create a new repository**.\n\nYou will then be able to name the new repository, and a clone of this repo will be created there.\n\nThe project you'll get is the default Craft starter you might create with `composer create-project craftcms/craft`, with the Spin Up Craft scaffolding around it.\n\nIf you intend to use this as a [Template Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository) (like Spin Up Craft is), you'll want to go to the repo **Settings** and check the **Template repository** checkbox.\n\nYou can also consider [adding an **Open in Codespaces**](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/adding-a-codespaces-badge) button.\n\n## Using your Craft CMS project in a browser via Github Codespaces\n\n1. Go to your repo in Github\n2. Click on **Use this template** and select **Open in a codespace** if your repository is a Template Repository. If it is a regular repository, click on **Code**, then click on the **Codespaces** tab, and click on the **Creat codespace on ...** button\n3. In the resulting Terminal window, type `make dev` to start the project up\n4. Wait until you see output like this, and then access the site via the credentials that are output on the console:\n\n```\nqueue_1    | ### Your Craft site is ready!\nqueue_1    | Frontend URL: https://khalwat-opulent-xylophone-q59g6p5vqj3rvr-8050.preview.app.github.dev/\nqueue_1    | CP URL: https://khalwat-opulent-xylophone-q59g6p5vqj3rvr-8050.preview.app.github.dev/admin\nqueue_1    | CP User: admin\nqueue_1    | CP Password: project\n```\n\nThis lets anyone use the project without having to do _any_ local setup.\n\nYou can use the Codespaces editor to edit Twig files, load the site frontend, or log into the Craft CP, all from within a browser!\n\nThe first time you start up your project in Codespaces, it'll take some time to set everything up. However, subsequent startups will be very quick.\n\nYou can access your existing Codespaces here:\n\nhttps://github.com/codespaces\n\nClick on one to resume it. If you don't see a Terminal window, go to the hamburger  menu in the top-left, and click on **Terminal \u003e New Terminal**\n\nYou are limited to 15 active Codespaces on the free plan, but you can go in and delete any older Codespaces you're not using at any time.\n\n## Using your Craft CMS project in local dev\n\n1. Have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed\n2. Clone your newly created repo down to your computer\n3. `cd` to your repo in your terminal\n4. Get the project up and running with `make dev`\n5. Wait until you see output like this, and then access the site via the credentials that are output on the console:\n\n```\nspin-up-craft-queue-1  | ### Your Craft site is ready!\nspin-up-craft-queue-1  | Frontend URL: http://localhost:8050/\nspin-up-craft-queue-1  | CP URL: http://localhost:8050/admin\nspin-up-craft-queue-1  | CP User: admin\nspin-up-craft-queue-1  | CP Password: project\n```\n\nHit `Control-C` to terminate the project and spin down the containers\n\nThe first time you start up your project, it'll take some time to set everything up. However, subsequent startups will be very quick.\n\n## Available `make` commands\n\nThis project uses `make` to execute various commands in the appropriate containers. Here's a list of available commands:\n\n* `make dev` - Start the dev server\n* `make composer xxx` - Execute a composer command in the PHP container\n* `make craft xxx` - Execute a `craft` CLI command in the PHP container\n* `make ssh` - Open up a shell in the PHP container\n* `make db-admin-reset` - Reset the admin (user with the `ID=1`) to the defaults in from the `.env` file; useful after importing a foreign database\n* `make db-export` - Clean the `db-seed/` directory and export the database to it\n* `make db-import` - Import the db from `db-seed/` directory into the mysql container\n\nIf the project is already running via `make dev` you can use a second terminal tab/window to execute additional commands.\n\n## Creating your Craft CMS project\n\nDevelop the site as you normally would by editing templates, adding content, adding assets, etc.\n\nCommit your changes to the repository.\n\nTo update the database dump in `db-seed/` directory, use the command:\n```\nmake db-export\n```\n... and then commit the new database dump to your repository. Ensure there is no confidential data in the database dump before doing so.\n\nPeople wanting to use the project will simply need to `git clone` the repo down, and get up and running with `make dev`\n\n## Using Spin Up Craft for support\n\nIf you're using Spin Up Craft to try to replicate an issue someone else is having:\n\n1. Clone a clean version of your repo down\n2. Copy their `composer.json` and their `composer.lock` files to overwrite the project's respective files\n3. Delete the repo's database dump from `db-seed/` and copy their database dump into it as an uncompressed `.sql` file\n\nThen start the project up with:\n```\nmake dev\n```\n\nIf you need to re-import their db at any time, you can use:\n```\nmake db-import\n```\n\nIf you don't have a login, or the client doesn't wish to share their password, you can then use:\n```\nmake db-admin-reset\n```\n\n...which will reset the admin user (`ID=1`) to the defaults specified in the `.env` file\n\nUsually the `composer.json`, `composer.lock`, and database dump are all you need to replicate issues. But if additional config/template files are needed, obtain them as well.\n\n\n## Random notes\n\n- The `.env` file is created by copying `example.env` file when you start the project up\n- The server will use the `INITIAL_SERVER_PORT` in the `.env` file for the initial port to start looking for unused ports from. It will increment it until it finds and unused port, and then use it\n- If instead you want to used a fixed port, you can explicitly set the `DEV_SERVER_PORT` in the `.env` file\n- The Docker containers will be named after the project directory, so give it a unique name for each project\n\n## To Do\n\n- Await orders from Ben \u0026 Ryan\n\nBrought to you by [nystudio107](https://nystudio107.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputyourlightson%2Fcraft-coding-challenge-13","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fputyourlightson%2Fcraft-coding-challenge-13","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputyourlightson%2Fcraft-coding-challenge-13/lists"}