aboutsummaryrefslogtreecommitdiff
path: root/bugzilla
diff options
context:
space:
mode:
authorMike Crute <mcrute@gmail.com>2017-05-16 00:18:30 +0000
committerMike Crute <mcrute@gmail.com>2017-05-16 00:18:30 +0000
commitda7cbc6e963b777286d9b75cb8c1cd200144c48a (patch)
treeaff9cba0c209cb7a65623d738927972d6b909a42 /bugzilla
parent88fbfde3870822a3baf82194a19f541f4662e5cf (diff)
downloaddockerfiles-da7cbc6e963b777286d9b75cb8c1cd200144c48a.tar.bz2
dockerfiles-da7cbc6e963b777286d9b75cb8c1cd200144c48a.tar.xz
dockerfiles-da7cbc6e963b777286d9b75cb8c1cd200144c48a.zip
Only extract variable data, use params
Diffstat (limited to 'bugzilla')
-rw-r--r--bugzilla/Dockerfile46
1 files changed, 32 insertions, 14 deletions
diff --git a/bugzilla/Dockerfile b/bugzilla/Dockerfile
index 69ef6f0..c97e197 100644
--- a/bugzilla/Dockerfile
+++ b/bugzilla/Dockerfile
@@ -1,5 +1,6 @@
1FROM ubuntu:16.04 1FROM ubuntu:16.04
2MAINTAINER Michael Crute <mike@crute.us> 2MAINTAINER Michael Crute <mike@crute.us>
3ARG bz_version
3 4
4ADD binaries/ /tmp/ 5ADD binaries/ /tmp/
5 6
@@ -17,10 +18,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
17 18
18# Install system dependencies 19# Install system dependencies
19 apt-get install -y \ 20 apt-get install -y \
20 python-boto3 \
21 cron \ 21 cron \
22 runit \
23 nginx \ 22 nginx \
23 python-boto3 \
24 runit \
25 sudo \
24 syslog-ng \ 26 syslog-ng \
25 && \ 27 && \
26 28
@@ -79,33 +81,49 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
79# Setup users and groups 81# Setup users and groups
80 groupadd -g 901 bugzilla && \ 82 groupadd -g 901 bugzilla && \
81 usermod -a -G bugzilla www-data && \ 83 usermod -a -G bugzilla www-data && \
82 useradd -d /var/www/html/bugzilla -M -N -g bugzilla -s /bin/bash -u 901 bugzilla && \ 84 useradd -d /var/www/html/bugzilla -M -N -g bugzilla -G www-data -s /bin/bash -u 901 bugzilla && \
83 85
84# Setup bugzilla app 86# Setup bugzilla app
85 mkdir -p /var/www/html && \ 87 mkdir -p /var/www/html && \
86 mkdir /srv/bugzilla && \ 88 tar -C /var/www/html/ -xvzf /tmp/release-${bz_version}.tar.gz && \
87 tar -C /var/www/html/ -xvzf /tmp/release-5.1.1.tar.gz && \ 89 ln -s /var/www/html/bugzilla-release-${bz_version} /var/www/html/bugzilla && \
88 ln -s /var/www/html/bugzilla-release-5.1.1 /var/www/html/bugzilla && \
89 tar -C /var/www/html/bugzilla/skins/contrib/ -xvzf /tmp/Bright-Skin.tar.gz && \ 90 tar -C /var/www/html/bugzilla/skins/contrib/ -xvzf /tmp/Bright-Skin.tar.gz && \
90 rm /etc/nginx/sites-enabled/default && \ 91 rm /etc/nginx/sites-enabled/default && \
91 ln -s /etc/nginx/sites-available/bugzilla /etc/nginx/sites-enabled/bugzilla && \ 92 ln -s /etc/nginx/sites-available/bugzilla /etc/nginx/sites-enabled/bugzilla && \
92 chown -R bugzilla:www-data /srv/bugzilla && \
93 93
94# Run the initial setup 94# Run the initial setup
95#
96# The bugzilla user must have permissions to modify files in the release
97# directory because checksetup.pl will change permissions so that the files are
98# owned by that user. Without those permission changes running plack will fail
99# with permission errors. Additionally, all checksetup.pl invocations must
100# happen as the bugzilla user for permissions to be properly updated.
101
102 chown -R bugzilla /var/www/html/bugzilla-release-${bz_version} && \
103
95 # First time creates the config file 104 # First time creates the config file
96 cd /var/www/html/bugzilla && ./checksetup.pl /tmp/answers.pl && \ 105 cd /var/www/html/bugzilla && sudo -u bugzilla ./checksetup.pl /tmp/answers.pl && \
97 106
98 # Second time does the real setup 107 # Second time does the real setup
99 cd /var/www/html/bugzilla && ./checksetup.pl /tmp/answers.pl && \ 108 cd /var/www/html/bugzilla && sudo -u bugzilla ./checksetup.pl /tmp/answers.pl && \
100
101 # Fix filesystem permissions
102 chown -R bugzilla:www-data /var/www/html/bugzilla-release-5.1.1 && \
103 109
104# Allow admin overrides 110# Allow admin overrides
105 mv /var/www/html/bugzilla/data /srv/bugzilla/data && \ 111 mkdir /srv/bugzilla && \
112
106 mv /var/www/html/bugzilla/localconfig /srv/bugzilla/localconfig && \ 113 mv /var/www/html/bugzilla/localconfig /srv/bugzilla/localconfig && \
107 ln -s /srv/bugzilla/localconfig /var/www/html/bugzilla/localconfig && \ 114 ln -s /srv/bugzilla/localconfig /var/www/html/bugzilla/localconfig && \
108 ln -s /srv/bugzilla/data /var/www/html/bugzilla/data && \ 115
116 mv /var/www/html/bugzilla/data/db /srv/bugzilla/ && \
117 ln -s /srv/bugzilla/db /var/www/html/bugzilla/data/ && \
118
119 mv /var/www/html/bugzilla/data/attachments /srv/bugzilla/ && \
120 ln -s /srv/bugzilla/attachments /var/www/html/bugzilla/data/ && \
121
122 mv /var/www/html/bugzilla/data/mining /srv/bugzilla/ && \
123 ln -s /srv/bugzilla/mining /var/www/html/bugzilla/data/ && \
124
125 mv /var/www/html/bugzilla/data/params.json /srv/bugzilla/ && \
126 ln -s /srv/bugzilla/params.json /var/www/html/bugzilla/data/ && \
109 127
110# Enable voting extension 128# Enable voting extension
111 rm /var/www/html/bugzilla/extensions/Voting/disabled && \ 129 rm /var/www/html/bugzilla/extensions/Voting/disabled && \