This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
var gulp = require('gulp') | |
, forever = require('forever-monitor') | |
, livereload = require('gulp-livereload') | |
, paths = require('./paths') | |
, _ = require('lodash') | |
; | |
/* Specifies the ports for local server dev */ | |
var localPorts = { layoutsServer: 1234, apiServer: 2345 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.6 | |
RUN apk --update add socat ca-certificates && \ | |
rm -rf /var/cache/apk/* && \ | |
rm -rf /root/.cache | |
ENTRYPOINT ["socat"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name socat \ | |
--restart=always \ | |
-p 6379:6379 \ | |
socat-local \ | |
-v TCP-LISTEN:6379,fork,reuseaddr openssl-connect:XXXX-XXXX-XXXX.redis.cache.windows.net:6380 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -ti --name rediscli \ | |
--net host \ | |
redis:alpine \ | |
redis-cli -h localhost -p 6379 -a THE-XXXX-PASSWORD ping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.8.3-alpine3.6 AS confd-build | |
WORKDIR /go/src/github.com/kelseyhightower | |
RUN apk --update add git bash | |
RUN git clone --depth 1 https://github.com/kelseyhightower/confd.git \ | |
&& cd confd \ | |
&& ./build | |
FROM alpine:3.6 | |
COPY --from=confd-build /go/src/github.com/kelseyhightower/confd/bin/confd /bin/ | |
RUN chmod +x /bin/confd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BUILD CONFD STAGE | |
# | |
FROM golang:1.8.3-alpine3.6 AS confd-build-stage | |
WORKDIR /go/src/github.com/kelseyhightower | |
RUN apk --update add git bash | |
RUN git clone --depth 1 https://github.com/kelseyhightower/confd.git \ | |
&& cd confd \ | |
&& ./build \ | |
&& chmod +x bin/confd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ebm | |
syncronize_bakends() { | |
echo "[nginx-confd] Synchronizing with confd backends" | |
# Loop until confd has updated the nginx config | |
until confd --onetime --config-file /etc/confd/confd.toml --log-level error -sync-only; do | |
echo "[nginx-confd] waiting for confd to refresh nginx configuration" | |
sleep 5 | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -ti --rm --name nginx \ | |
-v $(pwd)/confd-config:/etc/confd \ | |
-p 8080:80 \ | |
xynova/nginx-confd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name socat-for-nginx \ | |
--restart=always \ | |
--net container:nginx \ | |
xynova/socat \ | |
-v TCP-LISTEN:6379,fork,reuseaddr openssl-connect:XXXX-XXXX-XXXX.redis.cache.windows.net:6380 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -ti --name rediscli \ | |
--net container:nginx \ | |
redis:alpine \ | |
redis-cli -h localhost -p 6379 -a THE-XXXX-PASSWORD set /myapp/suggestions/drink covfefe |