This file contains 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
def get_fixture(name): | |
module = import_module('.conftest', 'tests') | |
return getattr(module, name)() |
This file contains 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
Pull latest base images... | |
Using default tag: latest | |
latest: Pulling from library/alpine | |
Digest: sha256:46e71df1e5191ab8b8034c5189e325258ec44ea739bba1e5645cff83c9048ff1 | |
Status: Image is up to date for alpine:latest | |
mainline-alpine: Pulling from library/nginx | |
Digest: sha256:385fbcf0f04621981df6c6f1abd896101eb61a439746ee2921b26abc78f45571 | |
Status: Image is up to date for nginx:mainline-alpine | |
Build app image... |
This file contains 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 | |
EXPOSE 8080 | |
LABEL "com.datadoghq.ad.logs"='[{"source": "api"}]' | |
# configure environment | |
ENV PYTHONUNBUFFERED 1 | |
# update and install packages | |
RUN apk update --no-cache && \ |
This file contains 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
function cd { | |
builtin cd "$@" | |
if [ -d ".virtualenv" ] ; then | |
source .virtualenv/bin/activate | |
fi | |
} |
This file contains 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
# custom prompt | |
. ~/bin/dev-prompt.sh | |
# variables | |
set -o vi -o noclobber -o ignoreeof | |
export EDITOR=vim | |
# aliases | |
alias rm='rm -i' | |
alias cp='cp -i' |
This file contains 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
# Configure Git | |
git config --global fetch.prune true | |
git config --global push.default simple | |
git config --global branch.autosetuprebase always | |
git config --global diff.submodule log | |
# Configure Git aliases | |
git config --global alias.st 'status' | |
git config --global alias.ci 'commit' | |
git config --global alias.co 'checkout' |
This file contains 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/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
This file contains 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 ubuntu:14.04 | |
# update packages | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && \ | |
apt-get -y dist-upgrade && \ | |
apt-get install -y python python-dev python-pip g++ libffi-dev libssl-dev make nginx supervisor && \ | |
pip install --upgrade pip |
This file contains 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 | |
# background save Redis data | |
lsave=`redis-cli lastsave` | |
redis-cli bgsave | |
while [ $lsave -eq `redis-cli lastsave` ]; do | |
sleep 5 | |
done |