We no longer need any env.sh
This commit is contained in:
parent
603fce7559
commit
8e91ba9b92
|
@ -122,14 +122,14 @@
|
||||||
upstart_pidfile_path = "{{{config.global.approot}}}/shared/{{{config.global.appname}}}.pid"
|
upstart_pidfile_path = "{{{config.global.approot}}}/shared/{{{config.global.appname}}}.pid"
|
||||||
upstart_respawn = true
|
upstart_respawn = true
|
||||||
upstart_respawn_limit = true
|
upstart_respawn_limit = true
|
||||||
upstart_runtime_root = "{{{config.global.approot}}}/current/tusd_linux_amd64/"
|
upstart_runtime_root = "{{{config.global.approot}}}/current/tusd_linux_amd64"
|
||||||
upstart_user = "www-data"
|
upstart_user = "www-data"
|
||||||
|
|
||||||
[[setup.playbooks.roles]]
|
[[setup.playbooks.roles]]
|
||||||
role = "{{{init.paths.roles_dir}}}/rsyslog/v3.0.1"
|
role = "{{{init.paths.roles_dir}}}/rsyslog/v3.0.1"
|
||||||
[setup.playbooks.roles.rsyslog_rsyslog_d_files.49-tusd]
|
[setup.playbooks.roles.rsyslog_rsyslog_d_files.49-tusd]
|
||||||
# Send {{{config.global.appname}}} messages to a dedicated logfile
|
# Send {{{config.global.appname}}} messages to a dedicated logfile
|
||||||
directives = [ "&~" ]
|
directives = [ "& stop" ]
|
||||||
[[setup.playbooks.roles.rsyslog_rsyslog_d_files.49-tusd.rules]]
|
[[setup.playbooks.roles.rsyslog_rsyslog_d_files.49-tusd.rules]]
|
||||||
rule = ":programname, startswith, \"{{{config.global.appname}}}\""
|
rule = ":programname, startswith, \"{{{config.global.appname}}}\""
|
||||||
logpath = "{{{config.global.approot}}}/shared/logs/{{{config.global.appname}}}.log"
|
logpath = "{{{config.global.approot}}}/shared/logs/{{{config.global.appname}}}.log"
|
||||||
|
@ -155,10 +155,6 @@
|
||||||
ansistrano_deploy_via = "download_unarchive"
|
ansistrano_deploy_via = "download_unarchive"
|
||||||
ansistrano_group = "ubuntu"
|
ansistrano_group = "ubuntu"
|
||||||
|
|
||||||
[[deploy.playbooks.tasks]]
|
|
||||||
copy = "src={{ playbook_dir }}/env.sh dest={{{config.global.approot}}}/current/tusd_linux_amd64/env.sh mode=0600 owner=root group=root"
|
|
||||||
name = "tusd | Upload environment"
|
|
||||||
|
|
||||||
[[deploy.playbooks.tasks]]
|
[[deploy.playbooks.tasks]]
|
||||||
name = "tusd | Set file attributes"
|
name = "tusd | Set file attributes"
|
||||||
file = "path={{{config.global.approot}}}/current/tusd_linux_amd64/tusd mode=0755 owner=www-data group=www-data"
|
file = "path={{{config.global.approot}}}/current/tusd_linux_amd64/tusd mode=0755 owner=www-data group=www-data"
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Uppy-server. Copyright (c) 2016, Transloadit Ltd.
|
|
||||||
#
|
|
||||||
# This file:
|
|
||||||
#
|
|
||||||
# - Walks over any FREY_ and TUSD_ environment variable (except for _AWS_)
|
|
||||||
# - Adds encrypted keys ready for use to .travis.yml
|
|
||||||
#
|
|
||||||
# Run as:
|
|
||||||
#
|
|
||||||
# source env.sh && ./encrypt.sh
|
|
||||||
#
|
|
||||||
# Authors:
|
|
||||||
#
|
|
||||||
# - Kevin van Zonneveld <kevin@transloadit.com>
|
|
||||||
|
|
||||||
set -o pipefail
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
# set -o xtrace
|
|
||||||
|
|
||||||
if [ -z "${FREY_DOMAIN:-}" ]; then
|
|
||||||
echo "FREY_DOMAIN not present. "
|
|
||||||
echo "Please first source env.sh"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set magic variables for current file & dir
|
|
||||||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
|
||||||
__base="$(basename ${__file} .sh)"
|
|
||||||
__freyroot="$(dirname "${__dir}")"
|
|
||||||
|
|
||||||
for var in $(env |awk -F= '{print $1}' |egrep '^(FREY|TUSD)_[A-Z0-9_]+$' |grep -v '_AWS_' |sort); do
|
|
||||||
echo "Encrypting and adding '${var}'"
|
|
||||||
travis encrypt "${var}=${!var}" --add env.global
|
|
||||||
done
|
|
|
@ -1,47 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# tusd. Copyright (c) 2016, Transloadit Ltd.
|
|
||||||
|
|
||||||
# This file:
|
|
||||||
#
|
|
||||||
# - Creates a brand new env.sh based on env.example.sh that is shipped with Git
|
|
||||||
# - Walks over any FREY_ and TUSD_ environment variable
|
|
||||||
# - Adds them as exports to to env.sh inside $__freyroot
|
|
||||||
#
|
|
||||||
# Run as:
|
|
||||||
#
|
|
||||||
# ./rebuild-env.sh
|
|
||||||
#
|
|
||||||
# Authors:
|
|
||||||
#
|
|
||||||
# - Kevin van Zonneveld <kevin@transloadit.com>
|
|
||||||
|
|
||||||
set -o pipefail
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
# set -o xtrace
|
|
||||||
|
|
||||||
if [ -z "${FREY_DOMAIN:-}" ]; then
|
|
||||||
echo "FREY_DOMAIN not present. "
|
|
||||||
echo "Please make sure your environment is set properly (via e.g. travis encrypt)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set magic variables for current file & dir
|
|
||||||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
|
||||||
__base="$(basename ${__file} .sh)"
|
|
||||||
__freyroot="$(dirname "${__dir}")"
|
|
||||||
|
|
||||||
if [ -f "${__freyroot}/env.sh" ]; then
|
|
||||||
echo "You alreayd have a '${__freyroot}/env.sh'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -v "${__freyroot}/env.example.sh" "${__freyroot}/env.sh"
|
|
||||||
chmod 600 "${__freyroot}/env.sh"
|
|
||||||
for var in $(env |awk -F= '{print $1}' |egrep '^(FREY|TUSD)_[A-Z0-9_]+$'| grep -v '_AWS_' |sort); do
|
|
||||||
echo "Adding '${var}' to env.sh"
|
|
||||||
echo "export ${var}=\"${!var}\"" >> "${__freyroot}/env.sh"
|
|
||||||
done
|
|
||||||
|
|
||||||
ls -al "${__freyroot}/env.sh"
|
|
6
Makefile
6
Makefile
|
@ -1,6 +1,6 @@
|
||||||
PHONY: frey
|
PHONY: frey
|
||||||
frey:
|
frey:
|
||||||
@npm install --global frey@0.3.12
|
@npm install --global frey@0.3.13
|
||||||
|
|
||||||
PHONY: deploy
|
PHONY: deploy
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -17,3 +17,7 @@ console:
|
||||||
PHONY: deploy-localfrey
|
PHONY: deploy-localfrey
|
||||||
deploy-localfrey:
|
deploy-localfrey:
|
||||||
@cd .infra && source env.sh && babel-node ${HOME}/code/frey/src/cli.js setup
|
@cd .infra && source env.sh && babel-node ${HOME}/code/frey/src/cli.js setup
|
||||||
|
|
||||||
|
PHONY: console-localfrey
|
||||||
|
console-localfrey:
|
||||||
|
@cd .infra && source env.sh && babel-node ${HOME}/code/frey/src/cli.js remote
|
||||||
|
|
Loading…
Reference in New Issue