{"id":15713718,"url":"https://github.com/luislavena/hydrofoil-crystal","last_synced_at":"2025-05-06T21:06:03.494Z","repository":{"id":40281717,"uuid":"421909742","full_name":"luislavena/hydrofoil-crystal","owner":"luislavena","description":"Opinionated, Alpine-based development container for Crystal","archived":false,"fork":false,"pushed_at":"2025-04-16T22:50:12.000Z","size":113,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T21:04:59.185Z","etag":null,"topics":["container-image","crystal-language","development"],"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/luislavena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":"luislavena"}},"created_at":"2021-10-27T17:19:22.000Z","updated_at":"2025-05-02T14:45:12.000Z","dependencies_parsed_at":"2023-02-14T00:31:34.640Z","dependency_job_id":"41a44043-bc20-4f68-ba4a-295b19fdd73b","html_url":"https://github.com/luislavena/hydrofoil-crystal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fhydrofoil-crystal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fhydrofoil-crystal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fhydrofoil-crystal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fhydrofoil-crystal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luislavena","download_url":"https://codeload.github.com/luislavena/hydrofoil-crystal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769397,"owners_count":21801376,"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":["container-image","crystal-language","development"],"created_at":"2024-10-03T21:33:04.755Z","updated_at":"2025-05-06T21:06:03.469Z","avatar_url":"https://github.com/luislavena.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/luislavena"],"categories":[],"sub_categories":[],"readme":"# Hydrofoil (Crystal)\n\u003e Opinionated, Alpine-based development container for Crystal\n\n## Features\n\n* Use Alpine (musl) as base to ease generation of static binaries\n* Use Crystal's official binary packages\n* Promote non-root container usage and proper file/directory ownership\n* Provide simple tools to certain dev related tasks (Eg. watch changes, process monitoring, etc)\n* Be continuously updated using GitHub Actions\n\nThis project does **not** aim to:\n\n* Be compatible with [Visual Studio Code devcontainer](devcontainer), [GitHub Codespaces](codespaces) or similar\n* Pack or include web-specific tools (Eg. Node, Deno, Yarn, etc)\n* Be _everything but the kitchen sink_\n\n## Overview\n\nThis project aims to be used **only for development**, replacing the local\ninstallation of tools for something consistent across OS and configurations.\n\nIt includes the minimum needed packages to have an usable Crystal compiler\nenvironment, leaving to you the option to add additional ones by using the\noffered image as base.\n\nAdditionally, it includes the following packages:\n\n* [fixuid](https://github.com/boxboat/fixuid): tweaks container UID/GID to avoid ownership issues on mounted volumes\n* [Overmind](https://github.com/DarthSim/overmind): Advanced Procfile-based process manager\n* [watchexec](https://github.com/watchexec/watchexec): simple tool that watches a path and runs a command whenever it detects modifications\n\n## Requirements\n\nThe container images can be used directly with [Docker](docker), but is\nrecommended to use in combination with [docker-compose](docker-compose).\n\nSee below for usage examples.\n\n## Usage\n\nTo take full advantage of this container image, you need to adjust your\n[`docker-compose.yml`](docker-compose-yml) primary service to use it:\n\n```yaml\nservices:\n  app:\n    image: ghcr.io/luislavena/hydrofoil-crystal:1.4\n    command: overmind start -f Procfile.dev\n    working_dir: /app\n\n    # Set these env variables using `export FIXUID=$(id -u) FIXGID=$(id -g)`\n    user: ${FIXUID:-1000}:${FIXGID:-1000}\n\n    volumes:\n      - .:/app:cached\n```\n\nLet's break down each element:\n\n```yaml\ncommand: overmind start -f Procfile.dev\n```\n\nThe container will execute Overmind process manager and start the processes\nindicated in the `Procfile.dev` file.\n\n```yaml\nworking_dir: /app\n```\n\nIt adjusts the container working directory to be anything other than the\ndefault. This `/app` location will be used to _mount_ our application code.\n\n```yaml\nuser: ${FIXUID:-1000}:${FIXGID:-1000}\n```\n\nThis sets the user that will be used within the container to something other\nthan `root`. A sudoers `user` has been setup and this instructions uses\nDocker's compose [variable substitution](variable-substitution) to read your\ncurrent user's UID/GID values and map correctly to the container user.\n\nThis technique helps eliminate root/non-root permission issues when working\nwith mounted directories.\n\nIs recommended you `export` these two variables (perhaps in your\nbash profile):\n\n```bash\nexport FIXUID=$(id -u) FIXGID=$(id -g)\n```\n\nFinally, we have the mounted directories:\n\n```yaml\nvolumes:\n  .:/app:cached\n```\n\nThis mounts your current directory as `/app` within the container. Combined\nwith `working_dir` makes it the working directory for all operations.\n\n### Other examples\n\nYou can find more advanced usage examples of this container image inside\nthe [examples](examples) directory.\n\n## Contribution Policy\n\nThis project is open to code contributions for bug fixes only. Features carry\na long-term maintenance burden so they will not be accepted at this time.\nPlease [submit an issue](new-issue) if you have a feature you'd like to\nrequest or discuss.\n\n[devcontainer]: https://code.visualstudio.com/docs/remote/containers\n[codespaces]: https://github.com/features/codespaces\n[new-issue]: https://github.com/luislavena/hydrofoil-crystal/issues/new\n[docker]: https://docs.docker.com/get-docker/\n[docker-compose]: https://docs.docker.com/compose/\n[docker-compose-yml]: https://docs.docker.com/compose/compose-file/compose-file-v3/\n[variable-substitution]: https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluislavena%2Fhydrofoil-crystal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluislavena%2Fhydrofoil-crystal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluislavena%2Fhydrofoil-crystal/lists"}