Skip to content

Instantly share code, notes, and snippets.

@chemitaxis
chemitaxis / circleci-2.0-eb-deployment.md
Created Oct 11, 2018 — forked from ryansimms/circleci-2.0-eb-deployment.md
Deploying to Elastic Beanstalk via CircleCi 2.0
View circleci-2.0-eb-deployment.md

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

View index.ts
import {createFactory, arrayOf, onPatch, getSnapshot, applySnapshot, onSnapshot, applyPatches, IModelFactory, unionOf, primitiveFactory} from 'mobx-state-tree'
const Patch = createFactory({
op: '',
path: '',
value: ''
})
function createForm(Factory){
const F = createFactory({
View cloudSettings
{"lastUpload":"2021-05-20T11:15:47.277Z","extensionVersion":"v3.4.3"}
@chemitaxis
chemitaxis / example.jsx
Last active Aug 5, 2017
Example mobx-state-tree and flow
View example.jsx
// @flow
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import interact from 'interactjs';
import { observer, inject } from 'mobx-react';
type IItem = {
id: string,
posX: number,
posY: number,
@chemitaxis
chemitaxis / nginx.conf
Created Jul 10, 2017
Nginx configuration for caching items by time
View nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@chemitaxis
chemitaxis / asyncomponent.js
Last active Jul 8, 2017
Async component React
View asyncomponent.js
import React, { Component } from 'react';
export default function asyncComponent(importComponent) {
class AsyncComponent extends Component {
constructor(props) {
super(props);
this.state = {
@chemitaxis
chemitaxis / nginx.conf
Created May 16, 2017
Enable two sites in nginx with express and node
View nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@chemitaxis
chemitaxis / cloudSettings
Last active Sep 17, 2017
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2017-09-17T09:43:25.228Z","extensionVersion":"v2.8.3"}
@chemitaxis
chemitaxis / app.js
Last active Mar 8, 2021
Webpack config example with react router 4 and bundle loader
View app.js
import React, { Component } from 'react'
import {
BrowserRouter as Router,
Route,
Link,
Switch
} from 'react-router-dom'
import { Provider, observer } from 'mobx-react'
import DevTools from 'mobx-react-devtools'
View designer.html
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;