move custom REDIS_HOST from Dockerfile to compose (#8)

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.

Co-authored-by: Angel Garcia <a-garcia-alvarez@users.noreply.github.com>
master
Angel Garcia 3 years ago committed by GitHub
parent 91f82dbb96
commit db3954e7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,6 +5,8 @@ services:
build:
context: jikan
dockerfile: Dockerfile
environment:
- REDIS_HOST=jikan-redis
depends_on:
- jikan-redis
ports:

@ -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

Loading…
Cancel
Save