Skip to content

Instantly share code, notes, and snippets.

View vovimayhem's full-sized avatar
🎸
Taking names and kicking ass

Roberto Quintanilla vovimayhem

🎸
Taking names and kicking ass
View GitHub Profile
@vovimayhem
vovimayhem / generate-a-rails-model-sample.sh
Last active February 25, 2019 21:13
Coding with Docker: Solving generated code file permission problems
# Generate a rails model:
rails g model my_model title:string body:text
@vovimayhem
vovimayhem / .env
Last active December 10, 2018 16:42
Adding sentry to a rails app
# You can point the Sentry Client to another (i.e. self-hosted) instance by setting this environment variable:
SENTRY_DSN: http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@sentry.icalialabs.com/[your_sentry_project_id]
@vovimayhem
vovimayhem / docker-stack.yml
Created April 4, 2018 20:51
compose-example
version: "3.4"
volumes:
postgres-data:
services:
postgres:
image: postgres:10.3-alpine
volumes:
- postgres-data:/var/lib/postgresql/data
@vovimayhem
vovimayhem / dev.Dockerfile
Created August 18, 2017 00:02
PhantomJS on Alpine (Docker)
# 1: Use node 6 as base:
FROM node:6-alpine
# 2: Download+Install PhantomJS, as the npm package 'phantomjs-prebuilt' won't work on alpine!
# See https://github.com/dustinblackman/phantomized
RUN set -ex \
&& apk add --no-cache --virtual .build-deps ca-certificates openssl \
&& wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \
&& npm install -g phantomjs \
&& apk del .build-deps
@vovimayhem
vovimayhem / docker-compose.yml
Created June 6, 2017 21:17
ELK stack example
version: "2"
volumes:
log-data:
driver: local
services:
elasticsearch:
image: elasticsearch:5.0
ports:
@vovimayhem
vovimayhem / hello.rb
Created May 9, 2017 01:21
Sample Ruby Hello World
puts "Hello!"
puts "This is an application running on ruby #{RUBY_VERSION}"
@vovimayhem
vovimayhem / docker-stack.yml
Created February 8, 2017 22:13
Docker Voting App Demo with fancy container placement
version: '3'
services:
redis:
image: redis:alpine
ports:
- "6379"
networks:
- frontend
deploy:
@vovimayhem
vovimayhem / env.sh
Last active September 12, 2016 17:27
A convenient way to set the env vars to configure a Docker Client access to a secure remote Docker Engine
# Make sure you have this file in a folder along with your certs.
# Also, keep in mind that the filenames must follow the convention:
# - Certificate Authority Certificate must be named "ca.pem"
# - Client Certificate must be named "cert.pem"
# - Client Key must be named "key.pem"
#
# Run with `source env.sh`
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH="$(pwd)"
export DOCKER_HOST=tcp://your-host-name:2376
@vovimayhem
vovimayhem / .gitignore
Last active November 10, 2015 00:26
Sample Docer+Phoenix project
# App artifacts
/_build
/db
/deps
/*.ez
# Generate on crash by the VM
erl_crash.dump
# The config/prod.secret.exs file by default contains sensitive
@vovimayhem
vovimayhem / dev-entrypoint.sh
Last active September 29, 2015 16:32
docker rails starter
#! /bin/bash
# Include the app's bin directory to $PATH:
export PATH=/usr/src/app/bin:$PATH
set -e
# The container was invoked without any particular command... we must check if is a new development environment, install whatever we need to install, and then run the default command:
if [ -z "$1" ]; then