Simple Application Environments
Stacker is a simple tool for defining application environments, aka stacks. Each stack is optimized for development and for production use as well. Stacker is built on top of Docker and Docker Compose as an abstraction layer. The main paradigm followed in designing Stacker was convention over configuration.
Install the CLI app globally using NPM.
# install stacker
npm install -g stacker-cli
# make sure it's working
stacker --version
Before going further, make sure you cd
into the root path of your project (cd ~/Projects/test-project
).
- Generate the
stacker.yaml
file
$ stacker init
If your project already has a stacker.yaml
file, this step is not required.
- Setup the project on your local machine
$ stacker link
This will do several things
- create a local IP alias (eg.
127.20.17.1
) - setup your chosen domain name in
/etc/hosts
- add the project to the projects list
- Build and start your application
$ stacker up
After this you will be able to reach your application using the domain name you choose previously. (eg. test-project.dev
)
Here are the sub-commands for stacker
CLI.
Generates stacker.yaml
based on your responses.
Type | Name | Description | Required |
---|---|---|---|
argument | [stack] |
Stack name | no |
option | `-y | --defaults` | Use default options |
- creates a local IP alias (eg.
127.20.17.1
) - adds your chosen domain name in
/etc/hosts
- adds the project to the projects list
Does the opposite of stacker link
.
Builds and starts the project.
Type | Name | Description | Required |
---|---|---|---|
option | --ip |
IP address | no |
option | --detached (-d ) |
Detached mode | no |
Builds the project.
Type | Name | Description | Required |
---|---|---|---|
option | --ip |
IP address | no |
Starts the application.
Stops the application.
Restarts the application.
Removes and stops the application.
Opens an interactive shell for a given service.
Type | Name | Description | Required |
---|---|---|---|
argument | [service] |
Service name | no |
Executes a pre-defined shell command.
Type | Name | Description | Required |
---|---|---|---|
argument | [command] |
Runnable name | no |
Ejects a config file so you'll be able to customize it.
Type | Name | Description | Required |
---|---|---|---|
argument | [file] |
Ejectable name | no |
Displays all the linked projects.
MIT @ Stacker