You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
973 B
Docker

FROM php:7.4-cli-alpine
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN apk add --no-cache \
git \
unzip \
rm -rf /var/cache/apk/* \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer --version
WORKDIR /var/www/html
USER www-data:www-data
RUN git clone https://github.com/jikan-me/jikan-rest.git -b v3 . \
&& git checkout v3 \
&& cp .env.dist .env \
&& composer require 'composer/package-versions-deprecated' \
&& composer install --prefer-dist --no-progress --classmap-authoritative --no-interaction \
&& composer update
RUN sed -i "s/CACHE_DRIVER=.*/CACHE_DRIVER=redis/" .env \
&& sed -i "s/REDIS_HOST=.*/REDIS_HOST=redis/" .env \
&& sed -i "s/CACHE_404_EXPIRE=.*/CACHE_404_EXPIRE=3600/" .env \
&& sed -i "s/CACHE_SEARCH_EXPIRE=.*/CACHE_SEARCH_EXPIRE=1000/" .env \
&& sed -i "s/GITHUB_REPORTING=.*/GITHUB_REPORTING=false/" .env
ADD /run-jikan.sh ./
ENTRYPOINT ["./run-jikan.sh"]
EXPOSE 8080