Spaces:
Sleeping
Sleeping
chore: Update Dockerfile and supervisor configurations for Redis and SRH
Browse files- Dockerfile +4 -0
- docker/redis.conf +23 -0
- docker/supervisor.conf +1 -1
Dockerfile
CHANGED
|
@@ -42,9 +42,13 @@ ENV SRH_PORT=7860
|
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
COPY docker/supervisor.conf /etc/supervisor/conf.d/supervisor.conf
|
|
|
|
| 45 |
|
| 46 |
RUN sudo chown -R rabil /app
|
| 47 |
|
|
|
|
|
|
|
|
|
|
| 48 |
ENV MIX_ENV=prod
|
| 49 |
|
| 50 |
CMD ["supervisord", "-c", "/etc/supervisor/conf.d/supervisor.conf"]
|
|
|
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
COPY docker/supervisor.conf /etc/supervisor/conf.d/supervisor.conf
|
| 45 |
+
COPY docker/redis.conf /etc/redis/redis.conf
|
| 46 |
|
| 47 |
RUN sudo chown -R rabil /app
|
| 48 |
|
| 49 |
+
RUN mkdir -p /etc/lib/redis
|
| 50 |
+
RUN sudo chown -R rabil /etc/lib/redis
|
| 51 |
+
|
| 52 |
ENV MIX_ENV=prod
|
| 53 |
|
| 54 |
CMD ["supervisord", "-c", "/etc/supervisor/conf.d/supervisor.conf"]
|
docker/redis.conf
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Redis configuration file example
|
| 2 |
+
|
| 3 |
+
port 7860
|
| 4 |
+
|
| 5 |
+
bind 0.0.0.0 ::1
|
| 6 |
+
|
| 7 |
+
timeout 0
|
| 8 |
+
|
| 9 |
+
loglevel notice
|
| 10 |
+
|
| 11 |
+
databases 16
|
| 12 |
+
|
| 13 |
+
protected-mode no
|
| 14 |
+
|
| 15 |
+
rdbcompression yes
|
| 16 |
+
|
| 17 |
+
dbfilename dump.rdb
|
| 18 |
+
|
| 19 |
+
dir /etc/lib/redis
|
| 20 |
+
|
| 21 |
+
maxmemory 8096mb
|
| 22 |
+
|
| 23 |
+
maxmemory-policy allkeys-lru
|
docker/supervisor.conf
CHANGED
|
@@ -6,7 +6,7 @@ stdout_logfile=/dev/stdout
|
|
| 6 |
stdout_logfile_maxbytes=0
|
| 7 |
|
| 8 |
[program:redis]
|
| 9 |
-
command=redis-server
|
| 10 |
autostart=true
|
| 11 |
autorestart=true
|
| 12 |
startretries=3
|
|
|
|
| 6 |
stdout_logfile_maxbytes=0
|
| 7 |
|
| 8 |
[program:redis]
|
| 9 |
+
command=redis-server /etc/redis/redis.conf
|
| 10 |
autostart=true
|
| 11 |
autorestart=true
|
| 12 |
startretries=3
|