mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-21 20:31:02 +01:00
refactored redis implementation
This commit is contained in:
parent
807b32da85
commit
8fe03b6a43
@ -31,7 +31,9 @@ services:
|
|||||||
image: maildev/maildev
|
image: maildev/maildev
|
||||||
ports:
|
ports:
|
||||||
- "{{ mail_interface_http_port }}:1080"
|
- "{{ mail_interface_http_port }}:1080"
|
||||||
redis:
|
|
||||||
image: redis
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database:
|
database:
|
||||||
|
redis:
|
@ -10,12 +10,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/postgresql/data
|
- database:/var/lib/postgresql/data
|
||||||
|
|
||||||
redis:
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
restart: always
|
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: redis:7-alpine
|
|
||||||
volumes:
|
|
||||||
- redis:/data
|
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -2,20 +2,9 @@ version: '2.2'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# External dependencies
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
redis:
|
|
||||||
image: redis:alpine
|
|
||||||
restart: always
|
|
||||||
env_file: mailu.env
|
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:
|
depends_on:
|
||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
@ -223,7 +212,7 @@ volumes:
|
|||||||
filter:
|
filter:
|
||||||
dkim:
|
dkim:
|
||||||
dovecot_mail:
|
dovecot_mail:
|
||||||
redis_data:
|
redis:
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
@ -14,17 +14,12 @@ services:
|
|||||||
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
redis:
|
|
||||||
restart: always
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
image: redis:7-alpine
|
|
||||||
networks:
|
networks:
|
||||||
- internal_network
|
- internal_network
|
||||||
healthcheck:
|
|
||||||
test: ['CMD', 'redis-cli', 'ping']
|
|
||||||
volumes:
|
|
||||||
- redis:/data
|
|
||||||
logging:
|
|
||||||
driver: journald
|
|
||||||
web:
|
web:
|
||||||
image: tootsuite/mastodon:{{version_mastodon}}
|
image: tootsuite/mastodon:{{version_mastodon}}
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -47,18 +47,9 @@ services:
|
|||||||
- "{{path_docker_volumes}}nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro"
|
- "{{path_docker_volumes}}nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- application
|
- application
|
||||||
redis:
|
|
||||||
image: redis:alpine
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
restart: always
|
|
||||||
logging:
|
|
||||||
driver: journald
|
|
||||||
volumes:
|
|
||||||
- redis:/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
|
||||||
interval: 1s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 30
|
|
||||||
cron:
|
cron:
|
||||||
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -28,11 +28,9 @@ services:
|
|||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 6
|
retries: 6
|
||||||
redis:
|
|
||||||
image: redis:alpine
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
volumes:
|
|
||||||
- redis:/data
|
|
||||||
restart: "always"
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -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:
|
For a hard reset, which will delete all data and stop all services, use the following commands:
|
||||||
```bash
|
```bash
|
||||||
docker-compose down
|
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
|
## Update Procedure
|
||||||
|
@ -41,20 +41,10 @@ services:
|
|||||||
|
|
||||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
|
||||||
redis:
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
image: redis:alpine
|
|
||||||
restart: always
|
|
||||||
logging:
|
|
||||||
driver: journald
|
|
||||||
volumes:
|
|
||||||
- redis_data:/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
|
||||||
interval: 1s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 30
|
|
||||||
volumes:
|
volumes:
|
||||||
database:
|
database:
|
||||||
redis_data:
|
redis:
|
||||||
application_data:
|
application_data:
|
||||||
bootstrap:
|
bootstrap:
|
12
templates/docker-redis-service.yml.j2
Normal file
12
templates/docker-redis-service.yml.j2
Normal 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
|
Loading…
Reference in New Issue
Block a user