diff --git a/docker-compose.production.yml b/docker-compose.production.yml index f88dadfb5..949473d2f 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -21,6 +21,7 @@ services: REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres" REDASH_COOKIE_SECRET: veryverysecret REDASH_WEB_WORKERS: 4 + restart: always worker: image: redash/redash:latest command: scheduler @@ -30,13 +31,16 @@ services: REDASH_REDIS_URL: "redis://redis:6379/0" REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres" QUEUES: "queries,scheduled_queries,celery" + restart: always WORKERS_COUNT: 2 redis: image: redis:3.0-alpine + restart: always postgres: image: postgres:9.5.6-alpine # volumes: # - /opt/postgres-data:/var/lib/postgresql/data + restart: always nginx: image: redash/nginx:latest ports: @@ -45,3 +49,4 @@ services: - server links: - server:redash + restart: always diff --git a/docker-compose.yml b/docker-compose.yml index 4227bc92c..5b5ed9114 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,7 @@ services: REDASH_LOG_LEVEL: "INFO" REDASH_REDIS_URL: "redis://redis:6379/0" REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres" + restart: always worker: build: . command: scheduler @@ -31,11 +32,14 @@ services: REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres" QUEUES: "queries,scheduled_queries,celery" WORKERS_COUNT: 2 + restart: always redis: image: redis:3.0-alpine + restart: always postgres: image: postgres:9.5.6-alpine # The following turns the DB into less durable, but gains significant performance improvements for the tests run (x3 # improvement on my personal machine). We should consider moving this into a dedicated Docker Compose configuration for # tests. command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF" + restart: always