Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
| version: '2' | |
| services: | |
| rancher: | |
| image: rancher/server | |
| container_name: rancher-server | |
| restart: always | |
| nginx: | |
| image: nginx:1.11 | |
| volumes: |
Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| module GoBuild | |
| extend self | |
| def build(file) | |
| process = ChildProcess.build('go', 'build', file) | |
| err = Tempfile.new('stderr-spec') | |
| process.io.stderr = err | |
| process.start | |
| process.poll_for_exit(10) | |
| err.rewind |
Following the pattern set forth by the https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview#google-oauth2-example
Gemfile
gem 'omniauth-jwt' #Note this is the modified version at https://github.com/jbarona/omniauth-jwt/tree/flexible-options
| #!/bin/bash | |
| set -exo pipefail | |
| BUILD_ENV=$1 | |
| if [ `uname` == 'Darwin' ]; then | |
| OSX=1 | |
| JSCOMPRESSOR="yuicompressor --type js" | |
| else | |
| OSX= |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |