Update project to make it work with latest v3 (#6)

- updated php version
- changed artisan config (must be reviwed later)
- changed internal port
- some other fast made things that should be fixed later

Co-authored-by: Angel Garcia <a-garcia-alvarez@users.noreply.github.com>
pull/8/head
Angel Garcia 3 years ago committed by GitHub
parent 99d0c1f4e4
commit 00eec7ec4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,7 +8,7 @@ services:
depends_on: depends_on:
- jikan-redis - jikan-redis
ports: ports:
- "9001:80" - "9080:8080"
networks: networks:
- default - default
restart: unless-stopped restart: unless-stopped

@ -1,4 +1,4 @@
FROM php:7.3-apache FROM php:7.4-apache
ENV COMPOSER_ALLOW_SUPERUSER 1 ENV COMPOSER_ALLOW_SUPERUSER 1
@ -7,17 +7,19 @@ RUN apt-get update && apt-get install -y \
git \ git \
unzip \ unzip \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \ && apt-get clean && rm -rf /var/lib/apt/lists/* \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.16 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer --version \ && composer --version \
&& a2enmod rewrite \ && a2enmod rewrite \
&& service apache2 restart \ && service apache2 restart \
&& git clone https://github.com/jikan-me/jikan-rest.git . \ && git clone https://github.com/jikan-me/jikan-rest.git -b v3 . \
&& git checkout v3 \
&& cp .env.dist .env \ && cp .env.dist .env \
&& sed -i "s/GITHUB_REPORTING=.*/GITHUB_REPORTING=false/" .env \ && sed -i "s/GITHUB_REPORTING=.*/GITHUB_REPORTING=false/" .env \
&& sed -i "s/REDIS_HOST=.*/REDIS_HOST=jikan-redis/" .env \ && sed -i "s/REDIS_HOST=.*/REDIS_HOST=jikan-redis/" .env \
&& sed -i "s/CACHE_DEFAULT_EXPIRE=.*/CACHE_DEFAULT_EXPIRE=3600/" .env \ && sed -i "s/CACHE_DEFAULT_EXPIRE=.*/CACHE_DEFAULT_EXPIRE=3600/" .env \
&& sed -i "s/CACHE_404_EXPIRE=.*/CACHE_404_EXPIRE=3600/" .env \ && sed -i "s/CACHE_404_EXPIRE=.*/CACHE_404_EXPIRE=3600/" .env \
&& sed -i "s/CACHE_SEARCH_EXPIRE=.*/CACHE_SEARCH_EXPIRE=3600/" .env \ && sed -i "s/CACHE_SEARCH_EXPIRE=.*/CACHE_SEARCH_EXPIRE=3600/" .env \
&& composer config --no-plugins allow-plugins true \
&& composer install --prefer-dist --no-progress --classmap-authoritative --no-interaction \ && composer install --prefer-dist --no-progress --classmap-authoritative --no-interaction \
&& composer update jikan-me/jikan && composer update jikan-me/jikan
@ -25,4 +27,4 @@ ADD run-jikan.sh ./
ENTRYPOINT ["./run-jikan.sh"] ENTRYPOINT ["./run-jikan.sh"]
EXPOSE 80 EXPOSE 8080

@ -3,4 +3,5 @@
chmod -R a+w storage/ chmod -R a+w storage/
# php:7.3.14-apache-buster ENTRYPOINT # php:7.3.14-apache-buster ENTRYPOINT
docker-php-entrypoint apache2-foreground #docker-php-entrypoint apache2-foreground
php artisan serve --host 0.0.0.0 --port=8080

Loading…
Cancel
Save