refactored redis implementation

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-26 16:40:19 +01:00
parent dae2a821aa
commit 5b9aa582ab
9 changed files with 36 additions and 62 deletions

View File

@ -31,7 +31,9 @@ services:
image: maildev/maildev
ports:
- "{{ mail_interface_http_port }}:1080"
redis:
image: redis
{% include 'templates/docker-redis-service.yml.j2' %}
volumes:
database:
database:
redis:

View File

@ -10,12 +10,9 @@ services:
volumes:
- database:/var/lib/postgresql/data
redis:
restart: always
{% include 'templates/docker-redis-service.yml.j2' %}
env_file: .env
image: redis:7-alpine
volumes:
- redis:/data
celeryworker:
restart: always

View File

@ -2,20 +2,9 @@ version: '2.2'
services:
# External dependencies
redis:
image: redis:alpine
restart: always
{% include 'templates/docker-redis-service.yml.j2' %}
env_file: mailu.env
volumes:
- "redis_data:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
logging:
driver: journald
depends_on:
- resolver
dns:
@ -223,7 +212,7 @@ volumes:
filter:
dkim:
dovecot_mail:
redis_data:
redis:
networks:
default:
driver: bridge

View File

@ -14,17 +14,12 @@ services:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
logging:
driver: journald
redis:
restart: always
image: redis:7-alpine
{% include 'templates/docker-redis-service.yml.j2' %}
networks:
- internal_network
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
volumes:
- redis:/data
logging:
driver: journald
web:
image: tootsuite/mastodon:{{version_mastodon}}
restart: always

View File

@ -47,18 +47,9 @@ services:
- "{{path_docker_volumes}}nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro"
volumes_from:
- application
redis:
image: redis:alpine
restart: always
logging:
driver: journald
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
{% include 'templates/docker-redis-service.yml.j2' %}
cron:
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
restart: always

View File

@ -28,11 +28,9 @@ services:
interval: 10s
timeout: 5s
retries: 6
redis:
image: redis:alpine
volumes:
- redis:/data
restart: "always"
{% include 'templates/docker-redis-service.yml.j2' %}
env_file:
- .env
volumes:

View File

@ -93,7 +93,7 @@ docker-compose exec -u "www-data" application php artisan schedule:run
For a hard reset, which will delete all data and stop all services, use the following commands:
```bash
docker-compose down
docker volume rm pixelfed_application_data pixelfed_database pixelfed_redis_data
docker volume rm pixelfed_application_data pixelfed_database pixelfed_redis
```
## Update Procedure

View File

@ -41,20 +41,10 @@ services:
{% include 'templates/docker-mariadb-service.yml.j2' %}
redis:
image: redis:alpine
restart: always
logging:
driver: journald
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
{% include 'templates/docker-redis-service.yml.j2' %}
volumes:
database:
redis_data:
redis:
application_data:
bootstrap:

View File

@ -0,0 +1,12 @@
redis:
image: redis:alpine
restart: always
logging:
driver: journald
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30