Page MenuHomeDevCentral

Run a MySQL and a PHP web application containers
ActivePublic

Authored by dereckson on Apr 21 2015, 19:30.
==> run-acquisitariat <==
#!/bin/sh
INSTANCE_NAME=acquisitariat
MYSQL_ROOT_PASSWORD=`openssl rand -hex 21`
MYSQL_DATADIR=/data/$INSTANCE_NAME/mysql
mkdir -p $MYSQL_DATADIR
chcon -Rt svirt_sandbox_file_t $MYSQL_DATADIR
docker run -d \
-e MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD \
-v $MYSQL_DATADIR:/var/lib/mysql \
--name $INSTANCE_NAME nasqueron/mysql
==> run-devcentral <==
#!/bin/sh
INSTANCE_NAME=devcentral
DATA_DIRECTORY=/data/$INSTANCE_NAME
MYSQL_INSTANCE=acquisitariat
PHABRICATOR_URL=http://$INSTANCE_NAME.nasqueron.org
PHABRICATOR_TITLE="Nasqueron DevCentral"
PHABRICATOR_ALT_FILE_DOMAIN="http://phabricator-files-for-devcentral-nasqueron.spacetechnology.net"
docker run -d \
--link $MYSQL_INSTANCE:mysql \
-v $DATA_DIRECTORY/repo:/var/repo \
-v $DATA_DIRECTORY/conf:/opt/phabricator/conf \
-p 31080:80 \
-e PHABRICATOR_URL=$PHABRICATOR_URL \
-e PHABRICATOR_TITLE="$PHABRICATOR_TITLE" \
--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 phabricator.base-uri $PHABRICATOR_URL && \
bin/config set security.alternate-file-domain "$PHABRICATOR_ALT_FILE_DOMAIN" && \
rm /etc/nginx/sites-enabled/default && \
chown -R app /var/repo'

Event Timeline

dereckson changed the title of this paste from untitled to Run a MySQL and a PHP web application containers.
dereckson updated the paste's language from autodetect to autodetect.