forked from leftypol/leftypol
docker: add redis instance
This commit is contained in:
parent
5ee20431e2
commit
cbcd743649
3 changed files with 33 additions and 0 deletions
11
compose.yml
11
compose.yml
|
@ -23,6 +23,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./local-instances/${INSTANCE:-0}/www:/var/www
|
- ./local-instances/${INSTANCE:-0}/www:/var/www
|
||||||
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
||||||
|
- redis-sock:/var/run/redis
|
||||||
|
|
||||||
#MySQL Service
|
#MySQL Service
|
||||||
db:
|
db:
|
||||||
|
@ -36,3 +37,13 @@ services:
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
volumes:
|
volumes:
|
||||||
- ./local-instances/${INSTANCE:-0}/mysql:/var/lib/mysql
|
- ./local-instances/${INSTANCE:-0}/mysql:/var/lib/mysql
|
||||||
|
|
||||||
|
redis:
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: ./docker/redis/Dockerfile
|
||||||
|
volumes:
|
||||||
|
- redis-sock:/var/run/redis
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
redis-sock:
|
||||||
|
|
6
docker/redis/Dockerfile
Normal file
6
docker/redis/Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FROM redis:7.4-alpine
|
||||||
|
|
||||||
|
RUN mkdir -p /var/run/redis && chmod 777 /var/run/redis
|
||||||
|
COPY ./docker/redis/redis.conf /etc/redis.conf
|
||||||
|
|
||||||
|
ENTRYPOINT [ "docker-entrypoint.sh", "/etc/redis.conf" ]
|
16
docker/redis/redis.conf
Normal file
16
docker/redis/redis.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Accept connections on the specified port, default is 6379 (IANA #815344).
|
||||||
|
# If port 0 is specified Redis will not listen on a TCP socket.
|
||||||
|
#port 6379
|
||||||
|
port 0
|
||||||
|
|
||||||
|
# Unix socket.
|
||||||
|
#
|
||||||
|
# Specify the path for the Unix socket that will be used to listen for
|
||||||
|
# incoming connections. There is no default, so Redis will not listen
|
||||||
|
# on a unix socket when not specified.
|
||||||
|
#
|
||||||
|
unixsocket /var/run/redis/redis-server.sock
|
||||||
|
# Executig a socket is a no-op, and we need to share acces to other programs.
|
||||||
|
# Shared the connection only with programs in the redis group for security.
|
||||||
|
#unixsocketperm 700
|
||||||
|
unixsocketperm 666
|
Loading…
Add table
Add a link
Reference in a new issue