Commit 63e19893 authored by Leonard Marschke's avatar Leonard Marschke 👾
Browse files

add missing files, sooo sorry

parent 437f544e
Loading
Loading
Loading
Loading
Loading

deploy/flask.sh

0 → 100644
+17 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e
set -x

gzip -cd "/tmp/flask-training-api.gz" | docker load

docker stop flask-training-api-{$FLAVOR} || true
sleep 10
docker kill flask-training-api-{$FLAVOR} || true

set +x
echo "running docker run [hidden secrets]"

docker run -d --rm -p 0.0.0.0:{$PORT}:8080 \
	-e FLASK_SENTRY_CONFIG__environment="{$FLAVOR}" \
	--name flask-training-api-{$FLAVOR} flask-training-api:latest

deploy/init_ssh.sh

0 → 100755
+10 −0
Original line number Diff line number Diff line
#!/bin/bash

mkdir .ssh
set +x
echo "$ID_RSA" > .ssh/id_rsa
echo "$ID_RSA_PUB" > .ssh/id_rsa.pub
echo "$KNOWN_HOSTS" > .ssh/known_hosts
set -x

chmod 600 .ssh/*

util/sentry.py

0 → 100644
+9 −0
Original line number Diff line number Diff line
from raven.contrib.flask import Sentry


def setup(app):
    if app.config['SENTRY_CONFIG']['environment'] in ['production', 'staging']:
        Sentry(app)
        print('Sentry started with environment "{}"'.format(app.config['SENTRY_CONFIG']['environment']))
    else:
        print('Sentry not started due to environment "{}"'.format(app.config['SENTRY_CONFIG']['environment']))