Skip to content

Commit

Permalink
Improve redis docker configuration
Browse files Browse the repository at this point in the history
* Save every 60 seconds if there's been at least one write operation

* Save to a named volume instead of a generated name that changes
  every time the container is created

* Set log level to 'warning' so logs aren't flooded with save info
  • Loading branch information
pixeltrix committed Apr 26, 2024
1 parent 92fc506 commit c749a23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ services:

redis:
image: redis:7.0
command: redis-server
command: ["redis-server", "--save '60 1'", "--loglevel warning"]
ports:
- "127.0.0.1:6379:6379"
volumes:
- type: volume
source: redis
target: /var/lib/redis/data
target: /data

web:
<<: *bops
Expand Down

0 comments on commit c749a23

Please sign in to comment.