docker: add redis to compose file.

This commit is contained in:
evazion
2021-05-26 02:44:10 -05:00
parent aab19a8cbb
commit 55b7b96c6c

View File

@@ -28,6 +28,7 @@ services:
- RAILS_ENV=production - RAILS_ENV=production
- RAILS_SERVE_STATIC_FILES=true - RAILS_SERVE_STATIC_FILES=true
- DATABASE_URL=postgresql://danbooru@postgres/danbooru - DATABASE_URL=postgresql://danbooru@postgres/danbooru
- DANBOORU_REDIS_URL=redis://redis:6379
- DANBOORU_CANONICAL_URL=http://localhost - DANBOORU_CANONICAL_URL=http://localhost
volumes: volumes:
- "danbooru-images:/danbooru/public/data" - "danbooru-images:/danbooru/public/data"
@@ -41,6 +42,7 @@ services:
environment: environment:
- RAILS_ENV=production - RAILS_ENV=production
- DATABASE_URL=postgresql://danbooru@postgres/danbooru - DATABASE_URL=postgresql://danbooru@postgres/danbooru
- DANBOORU_REDIS_URL=redis://redis:6379
- DANBOORU_CANONICAL_URL=http://localhost - DANBOORU_CANONICAL_URL=http://localhost
depends_on: depends_on:
- danbooru - danbooru
@@ -51,11 +53,15 @@ services:
environment: environment:
- RAILS_ENV=production - RAILS_ENV=production
- DATABASE_URL=postgresql://danbooru@postgres/danbooru - DATABASE_URL=postgresql://danbooru@postgres/danbooru
- DANBOORU_REDIS_URL=redis://redis:6379
- DANBOORU_CANONICAL_URL=http://localhost - DANBOORU_CANONICAL_URL=http://localhost
depends_on: depends_on:
- danbooru - danbooru
command: ["bash", "-c", "bin/wait-for-http http://danbooru:3000 5s && bin/delayed_job run"] command: ["bash", "-c", "bin/wait-for-http http://danbooru:3000 5s && bin/delayed_job run"]
redis:
image: redis
postgres: postgres:
image: evazion/postgres image: evazion/postgres
environment: environment: