forked from GithubBackups/vichan
docker: add redis instance
This commit is contained in:
parent
e181e4d5cb
commit
5a3fead579
11
compose.yml
11
compose.yml
@ -24,6 +24,7 @@ services:
|
||||
- ./local-instances/${INSTANCE:-0}/www:/var/www
|
||||
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
||||
- ./docker/php/jit.ini:/usr/local/etc/php/conf.d/jit.ini
|
||||
- redis-sock:/var/run/redis
|
||||
|
||||
#MySQL Service
|
||||
db:
|
||||
@ -37,3 +38,13 @@ services:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
volumes:
|
||||
- ./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…
x
Reference in New Issue
Block a user