{"id":13781735,"url":"https://github.com/Julien-R44/adonis-sail","last_synced_at":"2025-05-11T15:31:58.277Z","repository":{"id":57173617,"uuid":"442868381","full_name":"Julien-R44/adonis-sail","owner":"Julien-R44","description":"⛵Generate a ready-to-use local docker environment for your Adonis application","archived":false,"fork":false,"pushed_at":"2024-01-17T19:25:46.000Z","size":221,"stargazers_count":108,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T07:50:51.455Z","etag":null,"topics":["adonisjs","docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Julien-R44.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["julien-r44"],"polar":"Julien-R44"}},"created_at":"2021-12-29T19:15:59.000Z","updated_at":"2025-04-14T10:12:07.000Z","dependencies_parsed_at":"2024-01-15T09:06:41.510Z","dependency_job_id":"f106730d-79eb-4615-832f-ff5f26bad7d9","html_url":"https://github.com/Julien-R44/adonis-sail","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"b512e6751182dce32dc66038cb840fe8dc3b7b5b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fadonis-sail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fadonis-sail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fadonis-sail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fadonis-sail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Julien-R44","download_url":"https://codeload.github.com/Julien-R44/adonis-sail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253588594,"owners_count":21932285,"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":["adonisjs","docker","docker-compose"],"created_at":"2024-08-03T18:01:28.775Z","updated_at":"2025-05-11T15:31:57.948Z","avatar_url":"https://github.com/Julien-R44.png","language":"TypeScript","funding_links":["https://github.com/sponsors/julien-r44","https://polar.sh/Julien-R44"],"categories":["Packages"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://i.imgur.com/GQLZIO7.png\" width=\"250px\" /\u003e  \n  \u003cbr/\u003e\n  \u003ch3\u003eAdonis Sail\u003c/h3\u003e\n  \u003cp\u003e⛵Generate a ready-to-use local docker environment for your Adonis application\u003c/p\u003e\n  \u003ca href=\"https://www.npmjs.com/package/adonis-sail\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/adonis-sail.svg?style=for-the-badge\u0026logo=npm\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/npm/l/adonis-sail?color=blueviolet\u0026style=for-the-badge\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge\u0026logo=typescript\" /\u003e\n\u003c/div\u003e\n\n## Installation\n\n\u003e [!NOTE]  \n\u003e Looking for version for AdonisJS 5 ? Make sure to install `adonis-sail@0.0.7`\n\n```\npnpm i --save-dev adonis-sail\nnode ace configure adonis-sail\nnode ace sail:install\n```\n\n## Available services\n- PostgreSQL\n- MySQL\n- Redis\n- MinIO\n- MailHog\n\n## Usage\nMake sure to install needed Adonis Package, and follow instructions before running Sail's commands.\n`@adonisjs/redis`, `@adonisjs/lucid`, `@adonisjs/drive-*`, `@adonisjs/mail`.\n\nNow you can set your environment variables. Many of these will also be used in the generated docker-compose (look inside once created to know which ones). Especially the *_PORT or *_PASSWORD. \n\nOnce this is done you can run the command `node ace sail:install` and select the services you want. A `compose.yml` file will be created at the root of your project, you now just have to launch it by doing `docker compose up -d`.\n\nYou can launch again the `node ace sail:install` command at any time to add new services.\n\n## MinIO\nIf you plan to use Amazon S3 to store files while running your application in its production environment, you may wish to install the MinIO service when installing Sail. MinIO provides an S3 compatible API that you may use to develop locally using Adonis's s3 storage driver without creating \"test\" storage buckets in your production S3 environment. If you choose to install MinIO while installing Sail, a MinIO configuration section will be added to your application's compose.yml file.\n\nYou will need to [install the official Adonis drive-s3](https://docs.adonisjs.com/guides/drive#s3-driver) package to use MinIO locally. So install the package by following the documentation correctly, then in your .env file, use these variables :\n\n```\nS3_KEY=sail\nS3_SECRET=password\nS3_BUCKET=local\nS3_REGION=us-east-1\nS3_ENDPOINT=http://localhost:9000\n```\n\nAnd add this to `config/drive.ts` : \n```ts\n...\n  s3: {\n      forcePathStyle: true, // 👈 Don't forget this !\n      key: Env.get('S3_KEY'),\n      secret: Env.get('S3_SECRET'),\n      region: Env.get('S3_REGION'),\n      bucket: Env.get('S3_BUCKET'),\n      endpoint: Env.get('S3_ENDPOINT'),\n  }\n...\n```\nYou can now use the `@adonisjs/drive-s3` package to store and fetch files like you would do normally on a real AWS bucket. You can also access MinIO dashboard at : http://localhost:8900/dashboard\n\n## Databases\nTo connect to your application's databases from your local machine, you may use a graphical database management application such as [TablePlus](https://tableplus.com/). \nBy default, exposed ports are :\n- MySQL: 3306\n- PostgreSQL: 5432\n- Redis: 6379\n\n## MailHog\nMailHog intercepts emails sent by your application during local development and provides a convenient web interface so that you can preview your email messages in your browser.\nTo use MailHog install [install the official Adonis Mailer package](https://docs.adonisjs.com/guides/mailer). Follow the installation instructions, and select SMTP when prompted.\nYou have to set theses variables in your .env file : \n```\nSMTP_HOST=localhost\nSMTP_PORT=1025\nSMTP_USERNAME=\nSMTP_PASSWORD=\n```\nIn `config/mail.ts`, remove the `auth` part in the smtp configuration object. \n```ts\n...\n  smtp: {\n    driver: 'smtp',\n    host: Env.get('SMTP_HOST'),\n    port: Env.get('SMTP_PORT'),\n  },\n...\n```\n\nYou can now access the MailHog dashboard at http://localhost:8025/ to preview emails.\n\n## Mailpit\nMailpit is an alternative to MailHog. It's a service that allows you to preview emails sent by your application during local development.\n\nYou can follow the same steps as for MailHog, and also access the Mailpit dashboard at http://localhost:8025/\n\n## Known issues\n### MySQL 8\nIf you are using MySQL 8 (the default image), and you encounter the following error:\n```\nER_NOT_SUPPORTED_AUTH_MODE: \n  Client does not support authentication protocol requested by server; consider upgrading MySQL client \n```\n\nYou need to install mysql2 :\n```bash\nnpm install mysql2\n```\nAnd now configure Adonis to use it, in config/database.ts :\n```ts\n...\nmysql: {\n  client: 'mysql2' // 👈 Set this to 'mysql2'\n  connection: {\n    user: Env.get('MYSQL_USER'),\n    password: Env.get('MYSQL_PASSWORD'),\n    database: Env.get('MYSQL_DB_NAME'),\n  },\n...\n```\n\n## Details\nCurrently, the Adonis application is not dockerised. I rarely encountered problems on my applications depending on the version of Node.JS I use (it happens, but with a tool like `nvm` it's usually fixed pretty quickly). \nAnd it's obviously easier to handle your Adonis application when it's running outside a docker container. That's why I decided not to dockerise the Adonis app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJulien-R44%2Fadonis-sail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJulien-R44%2Fadonis-sail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJulien-R44%2Fadonis-sail/lists"}