Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12238
run-test-new-container.sh
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Nov 11 2015, 14:10
2015-11-11 14:10:23 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
run-test-new-container.sh
View Options
#!/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
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10892
Default Alt Text
run-test-new-container.sh (1 KB)
Attached To
Mode
P124 run-test-new-container.sh
Attached
Detach File
Event Timeline
Log In to Comment