@@ -38,69 +38,24 @@ FROM ${ENVIRONMENT}-ui-builder AS ui-builder
3838# artifacts built to /data/src/dist
3939RUN npm run build:${NPM_BUILD_SUFFIX}
4040
41- # APP-BASE
42- FROM php:7.3.28-apache AS base-app
43-
44- # install apt packages
45- # p7zip-full - used by LF application for unzipping lexicon uploads
46- # unzip - used by LF application for unzipping lexicon uploads
47- # gnupg2 - necessary for LFMerge package installation via SIL sources (will be uninstalled in production)
48- # curl - used by LF application
49- RUN apt-get update && apt-get -y install p7zip-full unzip gnupg2 curl && rm -rf /var/lib/apt/lists/*
50-
51- # see https://github.com/mlocati/docker-php-extension-installer
52- # PHP extensions required by the LF application
53- COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
54- RUN install-php-extensions gd mongodb intl
55-
56- # install and configure LFMerge
57- # LFMerge required apt packages
58- # python - required by Mercurial (written in Python), which is bundled in the LFMerge apt package
59- # lfmerge - main package, from SIL sources
60- # rsyslog - lfmerge logs to rsyslog and expects this to exist
61- # logrotate - TODO: is this required?
62- # iputils-ping - Chorus (part of LFMerge) requires the "ping" command to be available on the command line
63- RUN curl -L http://linux.lsdev.sil.org/downloads/sil-testing.gpg | apt-key add - \
64- && echo "deb http://linux.lsdev.sil.org/ubuntu bionic main" > /etc/apt/sources.list.d/linux-lsdev-sil-org.list \
65- && apt-get update \
66- && apt-get install --yes --no-install-recommends python lfmerge rsyslog logrotate iputils-ping \
67- && rm -rf /var/lib/apt/lists/*
68- COPY docker/app/lfmerge.conf /etc/languageforge/conf/sendreceive.conf
69- COPY docker/app/lfmergeqm-background.sh /
70- RUN adduser www-data fieldworks \
71- && chown -R www-data:www-data /var/lib/languageforge \
72- && chmod 0755 /var/lib/languageforge \
73- && mkdir -m 02775 -p /var/www/.local \
74- && chown www-data:www-data /var/www/.local
75-
76- # rsyslog customizations (imklog reads kernel messages, which isn't allowed or desired in Docker containers)
77- RUN sed -i '/load="imklog"/s/^/#/' /etc/rsyslog.conf
78-
79- # php customizations
80- COPY docker/app/customizations.php.ini $PHP_INI_DIR/conf.d/
81-
82- # apache2 customizations
83- RUN a2enmod headers rewrite
84- COPY docker/app/000-default.conf /etc/apache2/sites-enabled
85-
8641# COMPOSER-BUILDER
8742# download composer app dependencies
8843# git - needed for composer install
89- FROM base-app AS composer-builder
44+ FROM sillsdev/web-languageforge: base-php AS composer-builder
9045WORKDIR /composer
9146COPY src/composer.json src/composer.lock /composer/
9247ENV COMPOSER_ALLOW_SUPERUSER=1
9348RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* \
9449 && install-php-extensions @composer && composer install
9550
9651# PRODUCTION IMAGE
97- FROM base-app AS production-app
52+ FROM sillsdev/web-languageforge: base-php AS production-app
9853RUN rm /usr/local/bin/install-php-extensions
9954RUN apt-get remove -y gnupg2
10055RUN mv $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
10156
10257# DEVELOPMENT IMAGE
103- FROM base-app AS development-app
58+ FROM sillsdev/web-languageforge: base-php AS development-app
10459RUN install-php-extensions xdebug
10560COPY docker/app/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d
10661RUN mv $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini
0 commit comments