Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -15
Dockerfile
CHANGED
@@ -1,21 +1,17 @@
|
|
1 |
-
# Utiliser l'image officielle de Redis
|
2 |
FROM redis:alpine
|
3 |
|
4 |
-
#
|
5 |
-
RUN
|
6 |
-
&& chown -R redis:redis /data/redis \
|
7 |
-
&& chmod 777 /data/redis
|
8 |
|
9 |
-
#
|
10 |
-
COPY redis.conf /usr/local/etc/redis/redis.conf
|
11 |
-
RUN chown redis:redis /usr/local/etc/redis/redis.conf
|
12 |
-
|
13 |
-
# Exposer le port Redis
|
14 |
EXPOSE 6379
|
15 |
|
16 |
-
#
|
17 |
-
COPY
|
18 |
-
|
|
|
|
|
|
|
19 |
|
20 |
-
#
|
21 |
-
CMD ["/
|
|
|
|
|
1 |
FROM redis:alpine
|
2 |
|
3 |
+
# Installer redis-cli pour le healthcheck
|
4 |
+
RUN apk add --no-cache redis
|
|
|
|
|
5 |
|
6 |
+
# Exposer le port
|
|
|
|
|
|
|
|
|
7 |
EXPOSE 6379
|
8 |
|
9 |
+
# Copier la configuration
|
10 |
+
COPY redis.conf /usr/local/etc/redis/redis.conf
|
11 |
+
|
12 |
+
# Healthcheck
|
13 |
+
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s \
|
14 |
+
CMD redis-cli ping || exit 1
|
15 |
|
16 |
+
# Démarrer Redis
|
17 |
+
CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
|