Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Paste
P124
run-test-new-container.sh
Active
Public
Actions
Authored by
dereckson
on Nov 11 2015, 14:10.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F12238: run-test-new-container.sh
Mar 12 2016, 03:49
2016-03-12 03:49:18 (UTC+0)
Subscribers
None
#!/bin/sh
INSTANCE_NAME
=
phabtest
DOMAIN
=
$INSTANCE_NAME
.nasqueron.org
DATA_DIRECTORY
=
/tmp/
$INSTANCE_NAME
MYSQL_INSTANCE_NAME
=
phabtest-mysql
PHABRICATOR_URL
=
http://
$DOMAIN
:8080
PHABRICATOR_TITLE
=
"Demo"
# 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 MySQL container
docker-container-status
$MYSQL_INSTANCE_NAME
> /dev/null
if
[
"
$?
"
-lt
2
]
;
then
echo
"Warning: reusing existing MySQL container."
else
docker run -dt -e
MYSQL_ROOT_PASSWORD
=
`
openssl rand -hex
21
`
--name
$MYSQL_INSTANCE_NAME
nasqueron/mysql
fi
# Create Phabricator container
mkdir -p
$DATA_DIRECTORY
docker run -t -d
\
--link
$MYSQL_INSTANCE_NAME
: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_DOMAIN
=
$DOMAIN
\
--name
$INSTANCE_NAME
nasqueron/phabricator
Event Timeline
dereckson
edited the content of this paste.
(Show Details)
Nov 11 2015, 14:10
2015-11-11 14:10:23 (UTC+0)
dereckson
changed the title of this paste from untitled to
run-test-new-container.sh
.
dereckson
mentioned this in
D44: Essential installation tasks at first run
.
dereckson
mentioned this in
rDPHABfcb40b1f647a: Essential installation tasks at first run
.
Nov 15 2015, 00:06
2015-11-15 00:06:31 (UTC+0)
Log In to Comment