Commit 6e658d42 authored by Aaron Wells's avatar Aaron Wells
Browse files

more WIP on dockerizing Jenkins

parent 4bf22fef
FROM ubuntu:14.04
MAINTAINER "Aaron Wells <aaronw@catalyst.net.nz>"
# --build-arg to include build-time variables?
COPY catalyst.sources.list /etc/apt/sources.list
# make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default
# (from https://github.com/docker-library/postgres/blob/04b1d366d51a942b88fff6c62943f92c7c38d9b6/9.3/Dockerfile )
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& update-locale LANG=en_US.utf8
ENV LANG en_US.utf8
ENV LOCALE en_US.UTF-8
# Install needed software
RUN apt-get update && apt-get install -y \
......@@ -19,31 +27,28 @@ RUN apt-get update && apt-get install -y \
nodejs-legacy \
npm \
openjdk-7-jre \
supervisor \
xvfb \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g gulp
# TODO: fold these into the above
RUN apt-get update && apt-get install -y \
supervisor \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g gulp
# Create dataroot directory
RUN mkdir -p /var/lib/mahara/dataroot
RUN chown www-data:www-data /var/lib/mahara/dataroot
RUN mkdir -p /var/lib/dataroot/mahara
RUN chown -R www-data:www-data /var/lib/dataroot/mahara
# Create database users
# see https://docs.docker.com/engine/examples/postgresql_service/
USER postgres
RUN /etc/init.d/postgresql start &&\
psql -c "CREATE ROLE maharauser PASSWORD 'kupuhipa' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;" &&\
createdb -O maharauser mahara
createdb -E UTF8 -O maharauser mahara
# Configure Apache
USER root
RUN sudo sh -c "echo 'post_max_size = 32M' >> /etc/php5/cli/php.ini"
RUN sudo sh -c "echo 'post_max_size = 32M' >> /etc/php5/apache2/php.ini"
RUN mkdir -p /var/www/mahara/htdocs
RUN mkdir -p /var/www/mahara
RUN chown -R www-data:www-data /var/www/mahara
COPY docker-apache.conf /etc/apache2/sites-available/000-default
EXPOSE 80
......
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty main restricted
deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty-updates main restricted
deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty universe
deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty universe
deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty-updates universe
deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty-updates universe
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty-backports main restricted
# deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty-backports main restricted
deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty-security main restricted
deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty-security main restricted
deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty-security universe
deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty-security universe
# deb http://ubuntu.catalyst.net.nz/ubuntu/ trusty-security multiverse
# deb-src http://ubuntu.catalyst.net.nz/ubuntu/ trusty-security multiverse
<?php
$cfg = new stdClass();
$branch = 'master';
// database connection details
$cfg->dbtype = 'postgres';
$cfg->dbhost = 'localhost';
$cfg->dbuser = 'maharauser';
$cfg->dbname = 'mahara';
$cfg->dbpass = 'kupuhipa';
$cfg->dataroot = "/var/lib/dataroot/mahara";
$cfg->sendemail = false;
$cfg->sendallemailto = 'never@example.com';
$cfg->productionmode = false;
$cfg->perftofoot = true;
// Behat config
$cfg->dbprefix = 'a234567890123456789'; // Check for dbprefix problems
$cfg->wwwroot = "http://127.0.0.1";
$cfg->behat_dbprefix = 'behat_'; // must not empty
$cfg->behat_dataroot = "/var/lib/dataroot/mahara/behat";
$cfg->behat_wwwroot = "http://localhost:8000";
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment