Skip to content

Commit

Permalink
The application is not downloaded and stored in git anymore, it will …
Browse files Browse the repository at this point in the history
…download directly from LimeSurvey git repository
  • Loading branch information
crramirez committed Oct 9, 2018
1 parent 824a7b6 commit 48fee41
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@

FROM tutum/lamp

RUN apt-get update && \
RUN apt-get update -q -y && \
apt-get upgrade -q -y && \
apt-get install -q -y curl php5-gd php5-ldap php5-imap sendmail php5-pgsql php5-curl && \
apt-get clean && \
php5enmod imap

RUN rm -rf /app
ADD limesurvey.tar.bz2 /
RUN mv limesurvey app; \
mkdir -p /uploadstruct; \
chown -R www-data:www-data /app

RUN cp -a /app/upload/* /uploadstruct ; \
mkdir /uploadstruct/surveys ; \
chown -R www-data:www-data /uploadstruct

RUN chown www-data:www-data /var/lib/php5

ADD apache_default /etc/apache2/sites-available/000-default.conf
Expand All @@ -26,6 +16,24 @@ ADD run.sh /
RUN chmod +x /start.sh && \
chmod +x /run.sh

ENV LIMESURVEY_VERSION="3.14.10+180926"

RUN rm -rf /app && \
git clone https://github.com/LimeSurvey/LimeSurvey.git && \
cd LimeSurvey && git checkout ${LIMESURVEY_VERSION} && cd .. && \
rm -rf /LimeSurvey/.git && \
mv LimeSurvey app && \
mkdir -p /app/upload/surveys && \
mkdir -p /uploadstruct && \
chown -R www-data:www-data /app && \
cp -a /app/upload/* /uploadstruct

SHELL ["/bin/bash", "--login", "-c"]

RUN versions=(${LIMESURVEY_VERSION//+/ }) && \
version=${versions[1]} && \
sed -r -i "s/(config\['buildnumber'\] = ')(.*)('\;$)/\1${version}\3/g" /app/application/config/version.php

VOLUME /app/upload

EXPOSE 80 3306
Expand Down

0 comments on commit 48fee41

Please sign in to comment.