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 / 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 / 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 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 / .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 / 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 / Dockerfile
Last active February 25, 2019 21:29
Example of a development dockerfile & compose replicating the host's user
# Other parts of the file omitted for clarity:
# I: Runtime Stage: ============================================================
FROM ruby:2.6.1-alpine AS runtime
WORKDIR /usr/src
ENV HOME=/usr/src PATH=/usr/src/bin:$PATH
RUN apk add --no-cache ca-certificates less libpq nodejs npm openssl su-exec tzdata
@vovimayhem
vovimayhem / rails
Last active February 25, 2019 21:49
Changes to common rails wrapper script
#!/usr/bin/env ruby
# This file is located at `bin/rails`
# Load the 'switch_user_and_exec' routine:
require_relative '../config/switch_user_and_exec'
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
@vovimayhem
vovimayhem / common-services.yml
Created February 25, 2019 22:59
Ejemplo de Sidekiq + Docker
version: "2.4"
volumes:
postgres_data:
redis_data:
rabbit_data:
networks:
backend:
@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 / docker-flow-stack.yml
Created March 12, 2019 01:55
Docker Flow example for Docker Swarm
# Deploy using `docker stack deploy -f docker-flow-stack.yml docker_flow`
version: '3.7'
networks:
network: # Allows referring to 'docker_flow_network' on other stacks
services:
proxy:
image: dockerflow/docker-flow-proxy:19.03.02-16
ports: