Fuegovic commited on
Commit
9949b65
1 Parent(s): 51d46d3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -7,11 +7,11 @@ EXPOSE 7860
7
  # Update the system and install Redis
8
  RUN apt-get update && apt-get install -y redis-server
9
 
10
- # Append the commands to the Redis configuration file
11
- RUN echo "acl setuser test >redis_password on allcommands allkeys allchannels" >> /etc/redis/redis.conf
12
- RUN echo "requirepass password" >> /etc/redis/redis.conf
13
- RUN echo "port 7860" >> /etc/redis/redis.conf
 
14
 
15
-
16
- # Run the Redis server as the main process
17
  CMD ["redis-server", "/etc/redis/redis.conf"]
 
7
  # Update the system and install Redis
8
  RUN apt-get update && apt-get install -y redis-server
9
 
10
+ # Get the configuration file from the secret
11
+ RUN --mount=type=secret,id=REDIS_CONFIG,dst=/etc/redis/redis.conf \
12
+ if [ -f /etc/redis/redis.conf ]; then \
13
+ chmod 777 /etc/redis/redis.conf; \
14
+ fi
15
 
16
+ # Run the Redis server as the main process with the configuration file
 
17
  CMD ["redis-server", "/etc/redis/redis.conf"]