From 50cdf9061037c1567043a7a7e8b3ca4f0076c3db Mon Sep 17 00:00:00 2001 From: sunjay <9930542+zunjae@users.noreply.github.com> Date: Tue, 18 Feb 2020 11:45:20 +0100 Subject: [PATCH] hello world --- README.md | 7 ++----- docker-compose.yml | 12 ++++++++---- jikan/.env | 4 ++-- jikan/Dockerfile | 7 +++---- jikan/run-jikan.sh | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index a63ca33..72976a5 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,9 @@ Based off https://github.com/tzw0745/jikan-rest-docker ## Installation -If you don't have Docker installed, install that first (checkout my install-docker.sh script) - -Then: - ```bash -$ bash run.sh +$ docker-compose build +$ docker-compose up -d ``` ## Usage diff --git a/docker-compose.yml b/docker-compose.yml index 6933b0d..bf8b380 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,18 +2,22 @@ version: "3.4" services: - jikan-rest-api: + jikan-rest: build: context: jikan dockerfile: Dockerfile depends_on: - - jikan-redis-db + - jikan-redis ports: - "9001:80" networks: - default restart: always - jikan-redis-db: - image: redis + jikan-redis: + image: redis:rc-alpine + ports: + - "6379:6379" + networks: + - default restart: always diff --git a/jikan/.env b/jikan/.env index 80f1271..cc9d453 100755 --- a/jikan/.env +++ b/jikan/.env @@ -1,5 +1,5 @@ APP_ENV=production -APP_DEBUG=false +APP_DEBUG=true APP_KEY= APP_TIMEZONE=UTC APP_URL=http://localhost @@ -29,7 +29,7 @@ SLAVE_KEY= SLAVE_CLIENT_IP_HEADER="X-Real-IP" SLAVE_KEY_HEADER="X-Master" -REDIS_HOST=jikan-redis-db +REDIS_HOST=jikan-redis REDIS_PASSWORD=null REDIS_PORT=6379 diff --git a/jikan/Dockerfile b/jikan/Dockerfile index 67299fe..42d2f2a 100755 --- a/jikan/Dockerfile +++ b/jikan/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.11-apache-buster +FROM php:7.3.14-apache-buster ENV COMPOSER_ALLOW_SUPERUSER 1 @@ -11,9 +11,8 @@ RUN apt-get update && apt-get install -y \ && 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 \ - && git checkout 3e311808a8f6f872c1649f56f616dfeff4c58a06 + && composer install --prefer-dist --no-progress --no-suggest --classmap-authoritative --no-interaction -ADD .env /run-jikan.sh ./ +ADD .env run-jikan.sh ./ ENTRYPOINT ["./run-jikan.sh"] \ No newline at end of file diff --git a/jikan/run-jikan.sh b/jikan/run-jikan.sh index 45f3638..02468ed 100755 --- a/jikan/run-jikan.sh +++ b/jikan/run-jikan.sh @@ -2,5 +2,5 @@ # allow write permission chmod -R a+w storage/ -# php:7.3.11-apache-buster ENTRYPOINT +# php:7.3.14-apache-buster ENTRYPOINT docker-php-entrypoint apache2-foreground \ No newline at end of file