A simple helper to setup an AdonisJs Docker development environment.
npm install -g adonisdocker
This will give you access to the global copyadonisd
script.
cd /path/to/project
copyadonisd
This will copy the the adonisd script and supporting docker files to your project.
++++
.
├── adonisd - The main script that has all the commands
├── docker-compose.yml - Defines all the services for the dev env.
└── docker
├── app
├── Dockerfile - Build instructions for Docker
└── start - Start script for dev env
├── mysql
├── conf.d
└── logging.cnf
└── logs
└── .gitignore
++++
Now that the files have been copied to your project you need to run:
bash adonisd init
This command:
- Looks for the AdonisJs
ace
script in your project root (will fail if it cannot be found). - Updates your .env file with the following:
- HOST=0.0.0.0
- PORT=8080
- APP_PORT=80
- DB_PORT=3306
- DB_HOST=mysql
- Makes the
adonisd
script executable
Run:
adonisd start
This will boot the dev env. You can access your project at (default settings): http://localhost