Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 753b6739 authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Bring Dockerfile and composer up to date

parent d789ec68
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
/composer.lock
/vendor
.idea
+21 −31
Original line number Diff line number Diff line
FROM php:7.1-apache
FROM php:7.2-apache
MAINTAINER Julian Xhokaxhiu <info at julianxhokaxhiu dot com>

# internal variables
ENV HTML_DIR /var/www/html
ENV FULL_BUILDS_DIR $HTML_DIR/builds/full

# set the working directory
WORKDIR $HTML_DIR
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --fix-missing \
    apt-utils \
    gnupg

# enable mod_rewrite
RUN a2enmod rewrite

# install the PHP extensions we need
RUN apt-get update \
        && buildDeps=" \
                zlib1g-dev \
        " \
        && apt-get install -y git $buildDeps --no-install-recommends \
        && rm -r /var/lib/apt/lists/* \
        \
    && apt-get install -y git zlib1g-dev libzip-dev\
    && docker-php-ext-install zip\
        \
        && pecl install apcu \
        && docker-php-ext-enable apcu \
        \
        && docker-php-source delete \
        && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps

# set recommended settings for APCu
# see http://php.net/manual/en/apcu.configuration.php
RUN { \
    echo 'apc.ttl=7200'; \
  } > /usr/local/etc/php/conf.d/opcache-recommended.ini
    && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false zlib1g-dev libzip-dev

# install latest version of composer
ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
RUN chmod 0755 /usr/local/bin/composer
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

# set the working directory
WORKDIR $HTML_DIR
# add all the project files
COPY . $HTML_DIR

# enable mod_rewrite
RUN a2enmod rewrite
COPY conf/perf.conf /etc/apache2/conf-available/perf.conf
RUN a2enconf perf

# install latest version of composer
# Install composer from the official image
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Run composer install to install the dependencies
RUN composer install --optimize-autoloader --no-interaction --no-progress

# enable indexing for Apache
RUN sed -i "1s;^;Options +Indexes\n\n;" .htaccess

# install dependencies
RUN composer install --no-plugins --no-scripts

# fix permissions
RUN chmod -R 0775 /var/www/html \
    && chown -R www-data:www-data /var/www/html
+3 −3
Original line number Diff line number Diff line
{
  "name": "julianxhokaxhiu/lineage-ota",
  "description": "A simple OTA REST Server for LineageOS OTA Updater System Application",
  "version": "2.8.0",
  "version": "2.8.1",
  "type": "project",
  "keywords": [
    "android",
@@ -26,7 +26,7 @@
      "type":"package",
      "package": {
        "name": "julianxhokaxhiu/dotnotation",
        "version": "master",
        "version": "dev-master",
        "source": {
          "url": "https://gist.github.com/a6098de64195f604f56a.git",
          "type": "git",
@@ -42,7 +42,7 @@
    "mikecao/flight": "1.*",
    "julianxhokaxhiu/dotnotation": "dev-master",
    "ext-zip": "*",
    "monolog/monolog": "2.0.*"
    "monolog/monolog": "1.23.*"
  },
  "autoload": {
    "psr-4": {

conf/perf.conf

0 → 100644
+2 −0
Original line number Diff line number Diff line
ServerLimit 1024
MaxClients 1024
 No newline at end of file