We have been working on some exciting changes! This is a fundamental shift in workflow, in how nanobox is used, and how nanobox works for you. After about a dozen conversations that all followed the same pattern, it occurred to us: Nanobox needs to be simpler, it needs to get out of the way. And that's exactly what we did, we threw away the clunky workflow and started over.
Excluding one-time-only administrative commands like adding evars, Nanobox has been stripped down to two primary commands:
nanobox run
nanobox deploy
You no longer have to fuss with environments at all. Essentially, you can run
nanobox locally, or deploy
to production. run
has become the primary interface to your development flow. You can either run a single command inside of nanobox, or drop into an interactive console and run a series of commands:
Here are some examples:
# run django directly
nanobox run python manage.py runserver 0.0.0.0:8000
# install npm packages
nanobox run npm install
# drop into a nanobox console
nanobox run
Deployment has never been easier. After creating an app on dashboard.nanobox.io, you can deploy like this:
nanobox remote add app-name
nanobox deploy
Your daily flow might look something like this:
nanobox run
# write code
nanobox deploy
Of course, nanobox isn't losing any functionality at all:
- Add a local dns:
nanobox dns add local myapp.dev
- Add an evar:
nanobox evar add local FOO=bar
- Add additional remotes:
nanobox remote add app-name staging
- Deploy to an additional remote:
nanobox deploy staging
- Preview (dry-run) the deploy locally:
nanobox deploy dry-run
This change is not just skin deep, the boxfile.yml configuration has been completely revamped as well (ok mostly just renamed some things to make more sense).
Essentially, code.build
has been renamed to run.config
, and code.deploy
has been renamed to deploy.config
. Within those sections, many configurations were renamed. You can see the entire configuration changes here.
Update the Nanobox binary:
nanobox-update
Update the docker images:
nanobox update-images
The structure of your boxfile.yml configuration is the same, but you will need to rename some of the configuration:
Heads Up: You only need to change these configurations IF you have them.
[Global]
- rename
code.build
torun.config
- rename
code.deploy
todeploy.config
- move all configuration within
dev
intorun.config
[run.config
]
- rename
config
toengine.config
- rename
paths
toextra_path_dirs
- rename
lib_dirs
tocache_dirs
- rename
after_build
toextra_steps
- move
before_build
tasks intoextra_steps
- move
after_compile
intodeploy.config
and rename toextra_steps
- move
before_compile
tasks intodeploy.config
underextra_steps
[deploy.config
]
- rename
before_deploy
tobefore_live
- rename
before_deploy_all
tobefore_live_all
- rename
after_deploy
toafter_live
- rename
after_deploy_all
toafter_live_all
cd into your app folder:
cd /path/to/your/app
destroy the app installation (does not destroy the app, just removes it from nanobox):
nanobox destroy
run a nanobox session:
nanobox run
Enjoy!
Ya'll are AMAZING. Thank you ever so kindly : )