Skip to content
Snippets Groups Projects
Commit bc4fc09a authored by Pierre Guilleminot's avatar Pierre Guilleminot
Browse files

Move scripts in scripts/

parent 40367195
No related branches found
No related tags found
No related merge requests found
# This Dockerfile should be used to create an development environment to
# develop applications for cozy-stack. It installs go and couchdb 2.
# It should not be used for hosting your cozy cloud in production.
FROM debian:jessie FROM debian:jessie
ENV COUCHDB_VERSION 2.0.0 ENV COUCHDB_VERSION 2.0.0
......
#!/bin/bash #!/usr/bin/env bash
set -e set -e
COZY_ENV_DFL=production COZY_ENV_DFL=production
...@@ -7,7 +7,7 @@ COZY_ENV_DFL=production ...@@ -7,7 +7,7 @@ COZY_ENV_DFL=production
[ -z ${COZY_DEPLOY_USER} ] && COZY_DEPLOY_USER=${USER} [ -z ${COZY_DEPLOY_USER} ] && COZY_DEPLOY_USER=${USER}
pushd `dirname $0` > /dev/null pushd `dirname $0` > /dev/null
WORK_DIR=`pwd` WORK_DIR=$(dirname "`pwd`")
popd > /dev/null popd > /dev/null
if [ -r ${WORK_DIR}/local.env ]; then if [ -r ${WORK_DIR}/local.env ]; then
......
File moved
#!/bin/sh #!/usr/bin/env bash
[ -z ${COZY_DEV_HOST} ] && COZY_DEV_HOST="cozy.local" [ -z ${COZY_DEV_HOST} ] && COZY_DEV_HOST="cozy.local"
[ -z ${COZY_DEV_PORT} ] && COZY_DEV_PORT="8080" [ -z ${COZY_DEV_PORT} ] && COZY_DEV_PORT="8080"
...@@ -14,31 +14,31 @@ if [ -d ${COZY_STACK_PATH} ] && [ -f ${COZY_STACK_PATH}/cozy-stack ]; then ...@@ -14,31 +14,31 @@ if [ -d ${COZY_STACK_PATH} ] && [ -f ${COZY_STACK_PATH}/cozy-stack ]; then
fi fi
usage() { usage() {
echo "Usage: ${0} [-h] [-d <app path>] [–v <stack version>]" echo -e "Usage: ${0} [-h] [-d <app path>] [–v <stack version>]"
echo "\nEnvironment variables" echo -e "\nEnvironment variables"
echo "\n COZY_DEV_HOST" echo -e "\n COZY_DEV_HOST"
echo " specify the hostname or domain on which the dev server is listening" echo -e " specify the hostname or domain on which the dev server is listening"
echo " to incoming requests. default: dev.cozycloud.cc" echo -e " to incoming requests. default: dev.cozycloud.cc"
echo "\n COZY_DEV_PORT" echo -e "\n COZY_DEV_PORT"
echo " specify the port on which the dev server is listening." echo -e " specify the port on which the dev server is listening."
echo " default: 8080." echo -e " default: 8080."
echo "\n COZY_STACK_PATH" echo -e "\n COZY_STACK_PATH"
echo " specify the path of the cozy-stack binary folder or the binary" echo -e " specify the path of the cozy-stack binary folder or the binary"
echo " itself. default: \"\$GOPATH/bin\"." echo -e " itself. default: \"\$GOPATH/bin\"."
echo "\n COZY_STACK_HOST" echo -e "\n COZY_STACK_HOST"
echo " specify the hostname on which the cozy-stack is launched." echo -e " specify the hostname on which the cozy-stack is launched."
echo " default: localhost." echo -e " default: localhost."
echo "\n COZY_STACK_PORT" echo -e "\n COZY_STACK_PORT"
echo " specify the port on which the cozy-stack is listening." echo -e " specify the port on which the cozy-stack is listening."
echo " default: 8080." echo -e " default: 8080."
echo "\n COUCHDB_ENABLE" echo -e "\n COUCHDB_ENABLE"
echo " specify whether or not this script should launch couchdb." echo -e " specify whether or not this script should launch couchdb."
echo " default: 1" echo -e " default: 1"
echo "\n COUCHDB_HOST" echo -e "\n COUCHDB_HOST"
echo " specify the host of the couchdb database. default: localhost" echo -e " specify the host of the couchdb database. default: localhost"
echo "\n COUCHDB_PORT" echo -e "\n COUCHDB_PORT"
echo " specify the port of the couchdb database. default: 5984" echo -e " specify the port of the couchdb database. default: 5984"
} }
if [ -n "${COZY_STACK_PATH}" ] && [ ! -f "${COZY_STACK_PATH}" ]; then if [ -n "${COZY_STACK_PATH}" ] && [ ! -f "${COZY_STACK_PATH}" ]; then
...@@ -214,7 +214,7 @@ check_hosts() { ...@@ -214,7 +214,7 @@ check_hosts() {
} }
echo_err() { echo_err() {
>&2 echo "error: ${1}" >&2 echo -e "error: ${1}"
} }
while getopts ":hd:v:" optname; do while getopts ":hd:v:" optname; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment