Skip to content

Commit

Permalink
Build redis to use custom config
Browse files Browse the repository at this point in the history
  • Loading branch information
aldwin7894 committed Apr 15, 2023
1 parent a5edea6 commit 70e3c66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 8 additions & 0 deletions config/redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM redis:alpine

COPY ./redis.conf /usr/local/etc/redis/redis.conf

HEALTHCHECK --interval=10s --timeout=5s --retries=5 \
CMD redis-cli ping || exit 1

CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
12 changes: 4 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@ services:
- dbdata:/data/db
redis:
container_name: project-cyan-redis
image: redis:alpine
command: redis-server /usr/local/etc/redis/redis.conf
build:
context: ./config/redis/
dockerfile: Dockerfile
pull_policy: build
restart: always
environment:
- TZ
ports:
- 6379:6379
volumes:
- redis:/data
- ./config/redis:/usr/local/etc/redis
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 5s
retries: 5
redisinsight:
container_name: project-cyan-redisinsight
image: redislabs/redisinsight:latest
Expand Down

0 comments on commit 70e3c66

Please sign in to comment.