server { | |
root /var/www/example.com/static; | |
server_name example.com; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; | |
try_files /maintenance.html @proxy; | |
location @proxy { | |
proxy_pass http://127.0.0.1:10001; |
function getLogger(prefix) { | |
return function(message) { | |
console.log(prefix + ": " + message); | |
} | |
} | |
// Video component | |
(function() { | |
log = getLogger("video"); | |
log("initialized"); |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.10" | |
config.ssh.forward_agent = true |
In your repo's root directory, check in a requirements.txt with
boto==2.30.0
Then, from the project's Project Settings > Environment Variables page, add the two env vars: AWS_ACCESS_KEY_ID and AWS_SECRET_KEY, with an IAM key that can deploy to eb.
Then create a bash script to set up eb:
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
- Use Ember CLI
- In general, replace views + controllers with components
- Only use controllers at the top-level for receiving data from the route, and use
Ember.Controller
instead ofEmber.ArrayController
orEmber.ObjectController
- Fetch data in your route, and set it as normal properties on your top-level controller. Export an
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
import { graphql, GraphQLString, GraphQLInt } from 'graphql'; | |
import { objectType, enumType, schemaFrom, listOf } from 'graphql-schema'; | |
import request from 'promisingagent'; | |
const repositorySortEnum = enumType('RepositorySort') | |
.value('CREATED', 'created') | |
.value('UPDATED', 'updated') | |
.value('PUSHED', 'pushed') | |
.value('FULL_NAME', 'full_name') | |
.end(); |
I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.
UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess
policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.
This works for me with CircleCI and EB Cli.
{
"Version": "2012-10-17",
"Statement": [
{
This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.
If you are using the Circle CI 2.0, take a look at this article from ryansimms
On Project Settings > Environment Variables add this keys:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
The aws user must have the right permissions. This can be hard, maybe, this can help you.