Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F8321781
run-wolfphab.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
run-wolfphab.sh
View Options
#!/bin/sh
# -------------------------------------------------------------
# Phabricator — Wolfplex instance
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Author: Sébastien Santoro aka Dereckson
# Project: Nasqueron
# Created: 2015-10-25
# Description: Phabricator instance for Nasqueron
# License: Trivial work, not eligible to copyright
# Image: nasqueron/phabricator
# Source file: roles/phabricator/containers/files/run-wolfphab.sh
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# -------------------------------------------------------------
# Container parameters
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INSTANCE_NAME
=
wolfphab
PORT
=
35080
DOMAIN
=
phabricator.wolfplex.be
DATA_DIRECTORY
=
/srv/data/
$INSTANCE_NAME
MYSQL_INSTANCE
=
acquisitariat
MYSQL_NAMESPACE
=
wolfphab
# -------------------------------------------------------------
# Phabricator parameters
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PHABRICATOR_URL
=
https://
$DOMAIN
PHABRICATOR_TITLE
=
"Wolfplex Phabricator"
PHABRICATOR_ALT_FILE_DOMAIN
=
"https://phabricator-files-for-wolfplex.nasqueron.org"
# -------------------------------------------------------------
# Ensure container isn't already 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
# -------------------------------------------------------------
# Container launch
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
docker run -t -d
\
--link
$MYSQL_INSTANCE
:mysql
\
-v
$DATA_DIRECTORY
/repo:/var/repo
\
-v
$DATA_DIRECTORY
/conf:/opt/phabricator/conf
\
-p
$PORT
:80
\
-e
PHABRICATOR_URL
=
$PHABRICATOR_URL
\
-e
PHABRICATOR_TITLE
=
"
$PHABRICATOR_TITLE
"
\
-e
PHABRICATOR_ALT_FILE_DOMAIN
=
"
$PHABRICATOR_ALT_FILE_DOMAIN
"
\
-e
PHABRICATOR_STORAGE_NAMESPACE
=
"
$MYSQL_NAMESPACE
"
\
--name
$INSTANCE_NAME
nasqueron/phabricator
docker
exec
$INSTANCE_NAME
sh -c
'cd /opt/phabricator && \
bin/config set mysql.host mysql && \
bin/config set mysql.pass $MYSQL_ENV_MYSQL_ROOT_PASSWORD && \
bin/config set storage.default-namespace $PHABRICATOR_STORAGE_NAMESPACE && \
bin/config set phabricator.base-uri $PHABRICATOR_URL && \
bin/config set security.alternate-file-domain "$PHABRICATOR_ALT_FILE_DOMAIN" && \
bin/config set mailgun.domain $DOMAIN && \
rm -f /etc/nginx/sites-enabled/default && \
chown -R app /var/repo'
# Fixes bug phd doesn't run at the very first container launch
docker
exec
$INSTANCE_NAME
sv restart phd
echo
"Deployment done at `date`."
exit
0
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Tue, May 13, 16:51 (1 d, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572399
Default Alt Text
run-wolfphab.sh (2 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment