Skip to content

Instantly share code, notes, and snippets.

@tylerflint
tylerflint / boxfile.yml
Created December 27, 2016 23:14
Hugo with nanobox
run.config:
engine: static
cache_dirs:
- .bin
extra_path_dirs:
- /app/.bin
extra_steps:
@tylerflint
tylerflint / resize_nanobox_vm.sh
Last active December 6, 2016 19:50 — forked from joost/resize_boot2docker.sh
Resize Nanobox VirtualBox image
# Steps we will take:
# 1. Change virtualbox image type (this will take a bit)
# 2. Resize image
# 3. Resize partion (using GParted)
#
# Stop nanobox
nanobox stop
# First we need to change the size of the image.
@tylerflint
tylerflint / README.md
Last active November 21, 2016 10:00
Nanobox run & deploy

Major changes

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.

Overview

Excluding one-time-only administrative commands like adding evars, Nanobox has been stripped down to two primary commands:

nanobox run
@tylerflint
tylerflint / reset-lines.sh
Created October 13, 2016 22:40
Test line reset on *nix
#!/bin/bash
echo "+ Building application : "
echo " √ Pulling latest docker image "
echo " √ Starting docker container "
echo " √ Preparing environment for build "
echo " √ Installing binaries and runtimes "
echo "hey"
echo "there"
@tylerflint
tylerflint / 1-boxfile.yml
Created September 30, 2016 20:58
Add nodejs support into nanobox app config
code.build:
engine: ruby
@tylerflint
tylerflint / output1.txt
Last active May 10, 2016 20:09
nanobox build hooks output
+> Copying user's ssh keys into the build environment
+> Setting up directories and permissions
+> Cleaning up any previous builds
UPDATING PKG DATABASE ----------------->
reading local summary...
processing local summary...
updating database: 100%
pkg_summary.bz2 100% 159KB 159.1KB/s 40.1KB/s 00:01
processing remote summary (http://pkgsrc.nanobox.io/nanobox/base/Linux/)...
@tylerflint
tylerflint / .htaccess
Created January 28, 2016 21:13
Apache .htaccess configuration for disabling browser to cache files
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
@tylerflint
tylerflint / Boxfile
Created November 24, 2015 19:24
example rails Boxfile
build:
webserver: puma
web1:
name: web
worker1:
name: workerz
redis1:
@tylerflint
tylerflint / database.yml
Created November 24, 2015 19:21
configure rails database for nanobox
development:
adapter: postgresql
encoding: unicode
database: <%= ENV['POSTGRESQL1_NAME'] %>_development
pool: 25
host: <%= ENV['POSTGRESQL1_HOST'] %>
username: <%= ENV['POSTGRESQL1_USER'] %>
password: <%= ENV['POSTGRESQL1_PASS'] %>
test:
@tylerflint
tylerflint / questions.md
Created November 19, 2015 23:08
Engine find out questions

A nanobox engine is responsible for 5 things:

  1. Determining if the app type matches the engine
  2. Detecting service dependencies like postgres, redis, etc
  3. Preparing the environment that the application (code) will run within.
  4. Configuring the application to connect to the detected services.
  5. Compiling or building the code into a release.

We would greatly appreciate it if you would be willing to answer some or all of the following questions, in as much detail as you need, understanding that there are no wrong answers: