From ec61eb1eb4372fd8753d36dc706f876a4e3772cb Mon Sep 17 00:00:00 2001 From: sunjay <9930542+zunjae@users.noreply.github.com> Date: Wed, 18 Nov 2020 14:45:26 +0100 Subject: [PATCH] Works again, sorry, been sleeping --- docker-compose.yml | 2 +- jikan/.env | 6 +++--- jikan/Dockerfile | 28 ++++++++++++++-------------- jikan/run-jikan.sh | 5 +---- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 32cebd1..ded6e4a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: depends_on: - jikan-redis ports: - - "9001:80" + - "9001:8000" networks: - default restart: always diff --git a/jikan/.env b/jikan/.env index 40bcc8f..97e6885 100755 --- a/jikan/.env +++ b/jikan/.env @@ -4,15 +4,15 @@ APP_KEY= APP_TIMEZONE=UTC APP_URL=http://localhost -CACHE_DRIVER=file +CACHE_DRIVER=redis QUEUE_CONNECTION=redis CACHE_METHOD=legacy -CACHE_DEFAULT_EXPIRE=3600 +CACHE_DEFAULT_EXPIRE=1000 CACHE_META_EXPIRE=300 CACHE_USER_EXPIRE=300 CACHE_404_EXPIRE=3600 -CACHE_SEARCH_EXPIRE=3600 +CACHE_SEARCH_EXPIRE=1000 MICROCACHING=false MICROCACHING_EXPIRE=5 diff --git a/jikan/Dockerfile b/jikan/Dockerfile index 6d1272e..6661712 100755 --- a/jikan/Dockerfile +++ b/jikan/Dockerfile @@ -1,19 +1,19 @@ FROM php:7.3.11-apache-buster -ENV COMPOSER_ALLOW_SUPERUSER 1 +ENV COMPOSER_ALLOW_SUPERUSER 1 -RUN apt-get update && apt-get install -y \ - openssl \ - git \ - unzip \ - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && composer --version \ - && a2enmod rewrite \ - && service apache2 restart \ - && git clone https://github.com/jikan-me/jikan-rest.git . \ - && composer install --prefer-dist --no-progress --no-suggest --classmap-authoritative --no-interaction \ - && composer update jikan-me/jikan +RUN apt-get update && apt-get install -y \ + openssl \ + git \ + unzip \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ + && composer --version -ADD .env /run-jikan.sh ./ +RUN git clone https://github.com/jikan-me/jikan-rest.git . \ + && composer require 'composer/package-versions-deprecated' \ + && composer install --prefer-dist --no-progress --classmap-authoritative --no-interaction \ + && composer update jikan-me/jikan -ENTRYPOINT ["./run-jikan.sh"] \ No newline at end of file +ADD .env /run-jikan.sh ./ + +ENTRYPOINT ["./run-jikan.sh"] diff --git a/jikan/run-jikan.sh b/jikan/run-jikan.sh index 02468ed..5ac5b7f 100755 --- a/jikan/run-jikan.sh +++ b/jikan/run-jikan.sh @@ -1,6 +1,3 @@ #!/usr/bin/env bash -# allow write permission chmod -R a+w storage/ - -# php:7.3.14-apache-buster ENTRYPOINT -docker-php-entrypoint apache2-foreground \ No newline at end of file +php -S 0.0.0.0:8000 -t public \ No newline at end of file