{"id":30951027,"url":"https://github.com/daleal/oahu","last_synced_at":"2026-04-14T10:33:07.478Z","repository":{"id":40286690,"uuid":"258649306","full_name":"daleal/oahu","owner":"daleal","description":"Lightweight Koa generator template built with Docker and docker-compose to plug and play with a final image size of just ~301MB","archived":false,"fork":false,"pushed_at":"2023-01-05T19:37:05.000Z","size":967,"stargazers_count":1,"open_issues_count":20,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T07:16:55.711Z","etag":null,"topics":["cookiecutter","docker","docker-compose","dockerhub","heroku","javascript","koa","koa-router","node","postgresql","react","sequelize"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/daleal/oahu","language":"JavaScript","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/daleal.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}},"created_at":"2020-04-24T23:50:02.000Z","updated_at":"2020-07-23T20:02:32.000Z","dependencies_parsed_at":"2023-02-04T12:46:15.987Z","dependency_job_id":null,"html_url":"https://github.com/daleal/oahu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daleal/oahu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Foahu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Foahu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Foahu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Foahu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daleal","download_url":"https://codeload.github.com/daleal/oahu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daleal%2Foahu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31793215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cookiecutter","docker","docker-compose","dockerhub","heroku","javascript","koa","koa-router","node","postgresql","react","sequelize"],"created_at":"2025-09-11T05:27:36.437Z","updated_at":"2026-04-14T10:33:07.462Z","avatar_url":"https://github.com/daleal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oahu\n\nLightweight Koa generator template built with `Docker` and `docker-compose` to **_plug and play_** with a final image size of just `~301MB`.\n\n**Heavily** based on this [generator template](https://github.com/IIC2513/generator-template).\n\n## But... **Why**?\n\nIf you are anything like me, you probably also hate having to download extra tooling **just** to generate the boilerplate project. With Docker, I can generate the project and then run it using only one tool. I love that! Also, the template has a **_plug and play_** philosophy, so it will **just work**, and I like that too.\n\n## Using Oahu\n\nTo use the generator, **you don't need to download/clone anything**. Just run the following command:\n\n```\ndocker run -v $(pwd):/oahu/base daleal/oahu -n \"Project Name\"\n```\n\nThat will generate a folder named `project-name` with your generated project!\n\n### Requirements\n\nThe only requirement to run the generator is `Docker`. To use the generated application, though, you will also need `Compose` (and **nothing more**).\n\n## Template Documentation\n\n### Running Locally\n\n#### Requirements\n\nThe requirements for this template are simple:\n\n* `Docker`\n* `Docker Compose`\n\nAdditionally, to deploy to `heroku` you will need:\n\n* `Heroku`\n\n#### Plug and Play\n\nThis repo comes with a `docker-compose.yml` file to handle using a `postgres` image pulled from the web and to use a `.env` file for environmental variables. As such, `compose` requires a `.env` file to function, so run:\n\n```\ncp .env.example .env\n```\n\nAfter that, configure the `.env` file as you please and `compose` is now ready to be used.\n\nTo get started quickly, build the image:\n\n```\ndocker-compose build\n```\n\nFinally, start the server:\n\n```\ndocker-compose up\n```\n\nYour app can now be found in `localhost:3000`. From now on, every command regarding the app that should be run as `[COMMAND]` will now be run as `docker-compose run web [COMMAND]`. This includes database migrations (`docker-compose run web sequelize db:migrate`).\n\n#### Caveats (or, may I say, Docker and Windows)\n\nIf you are using `Docker` on _Linux_ or `Docker` on _MacOS_, chances are your usage process has been almost flawless, and the instructions given in the tutorial worked at the first try. However, if you are using `Docker Toolbox` on Windows or `Docker for Windows` on Windows, things are different. Mainly, two things change:\n\n* Due to the technology being run inside a _Virtual Machine_, instead of finding your app in `localhost:3000`, your app will be defaulted to `192.168.99.100:3000` and will **not** be found in `localhost:3000`.\n* Due to the database volume being mounted to a _named volume_ created by the _Virtual Machine_, every Docker update **will** wipe your database clean. When using for development purposes, some simple seeds are enough to make this a _no-problem_. Keep an eye if that is your production environment, though, as data **will** be lost if you are not careful.\n\n#### Docker Image\n\nThe image generated by `docker-compose build` with the original repo has a size of just `~301MB`, and contains a standard Koa app using `koa-router`, `postgresql` as the database, `sequelize` as the ORM, `sass` as the stylesheet pre-processor, `node 12.16` as the JavaScript runtime and `react` as the frontend framework.\n\n#### When to Build\n\nThe command `docker-compose build` must be used only in 2 cases:\n\n1. Changes in the `package.json`: `docker-compose build` will notice if either the `package.json` or the `yarn.lock` present any changes. If so, it will re-run `yarn install` to update the image\n2. New `assets`: `docker-compose build` will notice if new assets need to be precompiled and will run `webpack -p` to update the image. This is only relevant on production environments, so don't worry too much about this during development (it is only important to precompile the assets for production environments)\n\nNotice that `Docker` is smart and if you run `docker-compose build` and the `package.json` has not changed and no new `assets` need to be precompiled, `Docker` will use cached layers to build the image, dramatically decreasing the amount of time wasted in your life (hopefully).\n\n### Heroku Deployment\n\n#### Automagic Deployment\n\nThe template includes a GitHub Action to **automagically** deploy your app to `heroku`! On every push to `master` (or whenever a Pull Request gets merged into `master`), the workflow will trigger and build, push and deploy your app to `heroku`, including database migrations! For this **magic** to work, make sure to do the following stuff:\n\n1. Get your `heroku` API Key from your `heroku` dashboard and add it as a GitHub Secret to your repository with a key corresponding to `HEROKU_API_KEY`.\n2. Make sure to have a `heroku` app created. Get the app name and add it as a GitHub Secret to your repository with a key corresponding to `APP_NAME`.\n3. Make sure that your app has the `heroku-postgresql` addon provisioned. You can provision it from the dashboard or by running `heroku addons:create heroku-postgresql:hobby-dev -a \u003cappname\u003e` from your terminal, where `\u003cappname\u003e` corresponds to the name of your `heroku` app.\n\nSo, to sum up, you should have the following GitHub Secrets in your repo:\n\n- `HEROKU_API_KEY`: your API key for `heroku`\n- `APP_NAME`: the name of your app in `heroku`\n\nThat's it! Your app should be now deploying **automagically**!\n\n#### Manual Deployment\n\nIf you still want to deploy your app manually, you can use the Container Registry. To deploy to `heroku` using Container Registry, make sure to be logged in to the platform (`heroku login`). Then, log in to Container Registry:\n\n```\nheroku container:login\n```\n\nAfter that, create a new `heroku` app:\n\n```\nheroku create\n```\n\nDon't forget to add the `heroku-postgresql` addon to your `heroku` app (when deploying to `heroku`, only the Rails app will be deployed, and the `postgres` container used locally must be replaced with the `heroku-postgresql` addon):\n\n```\nheroku addons:create heroku-postgresql:hobby-dev\n```\n\nThis command will add the **free** basic `heroku-postgresql` addon to your app (you can upgrade this later if you desire).\n\nNext, build the image and push it to Container Registry:\n\n```\nheroku container:push web\n```\n\nFinally, release the image to your app:\n\n```\nheroku container:release web\n```\n\n**Important Note**: Once your app is created, to push new changes you only have to run `heroku container:push web` and then `heroku container:release web`.\n\nTo open the app in a browser, you can run `heroku open`. You can also access directly using the app's URL.\n\n### Additional Features\n\nThe template also includes a Pull Request template. That means that every Pull Request's comment will get **automagically** filled with a default structure that can get altered.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaleal%2Foahu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaleal%2Foahu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaleal%2Foahu/lists"}