Skip to content

Instantly share code, notes, and snippets.

View just1689's full-sized avatar
☁️
In the cloud

Justin Tamblyn just1689

☁️
In the cloud
  • South Africa
View GitHub Profile
@just1689
just1689 / embedded.go
Created February 20, 2019 14:22 — forked from joshrotenberg/embedded.go
embedded nsqd
package main
// This is a basic example of running an nsqd instance embedded. It creates
// and runs an nsqd with all of the default options, and then produces
// and consumes a single message. You are probably better off running a
// standalone instance, but embedding it can simplify deployment and is
// useful in testing.
// See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and
// https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for
@just1689
just1689 / ansible-docker-network.yml
Created September 27, 2019 11:51 — forked from clems4ever/ansible-docker-network.yml
Deploy a docker service using Ansible within Docker Swarm 1.12
---
- name: Check if network {{ name }} exists
delegate_to: "{{ groups['docker_swarm_issuer'][0] }}"
run_once: true
command: docker network ls -q --filter name=^{{ name }}$
register: network_exists
changed_when: false
- name: Create network {{ name }}
command: docker network create --driver {{ driver }} {{ name }}