Page MenuHomeDevCentral
Paste P123

run-test-container.sh
ActivePublic

Authored by dereckson on Nov 8 2015, 23:54.
Tags
None
Referenced Files
F12062: run-test-container.sh
Nov 8 2015, 23:54
Subscribers
None
#!/bin/sh
INSTANCE_NAME=phabtest
DOMAIN=$INSTANCE_NAME.nasqueron.org
DATA_DIRECTORY=/data/$INSTANCE_NAME
MYSQL_INSTANCE=acquisitariat
PHABRICATOR_URL=http://$DOMAIN
PHABRICATOR_TITLE="Nasqueron DevCentral"
PHABRICATOR_ALT_FILE_DOMAIN="http://phabricator-files-for-devcentral-nasqueron.spacetechnology.net"
# Checks container isn't running
docker-container-status $INSTANCE_NAME > /dev/null
if [ "$?" -lt 2 ]; then
echo "Container is already running."
echo "To force relaunch, try docker stop $INSTANCE_NAME ; docker rm $INSTANCE_NAME ; $0"
exit 1
fi
# Create container
docker run -t -d \
--link $MYSQL_INSTANCE:mysql \
-v $DATA_DIRECTORY/repo:/var/repo \
-v $DATA_DIRECTORY/conf:/opt/phabricator/conf \
-p 8080:80 \
-e PHABRICATOR_URL=$PHABRICATOR_URL \
-e PHABRICATOR_TITLE="$PHABRICATOR_TITLE" \
-e PHABRICATOR_ALT_FILE_DOMAIN="$PHABRICATOR_ALT_FILE_DOMAIN" \
-e PHABRICATOR_DOMAIN=$DOMAIN \
--name $INSTANCE_NAME nasqueron/phabricator

Event Timeline

dereckson changed the title of this paste from untitled to run-test-container.sh.
dereckson updated the paste's language from autodetect to autodetect.