From 7923c4fc2271467ee297a2ea4eafee07e292d370 Mon Sep 17 00:00:00 2001 From: Angel Garcia Date: Fri, 14 Oct 2022 21:53:25 +0200 Subject: [PATCH] move custom REDIS_HOST from Dockerfile to compose We now use an explicit env var in the compose file. This should make it more clear which hostname the api will try to connect to. --- docker-compose.yml | 2 ++ jikan/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e6dc6c9..912f166 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: jikan dockerfile: Dockerfile + environment: + - REDIS_HOST=jikan-redis depends_on: - jikan-redis ports: diff --git a/jikan/Dockerfile b/jikan/Dockerfile index 1d90f5f..d32fec4 100755 --- a/jikan/Dockerfile +++ b/jikan/Dockerfile @@ -18,7 +18,7 @@ RUN git clone https://github.com/jikan-me/jikan-rest.git -b v3 . \ && composer update jikan-me/jikan RUN sed -i "s/CACHE_DRIVER=.*/CACHE_DRIVER=redis/" .env \ - && sed -i "s/REDIS_HOST=.*/REDIS_HOST=jikan-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