add queue container running sidekiq

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-04-02 20:47:04 +02:00
parent 49050aaddf
commit 626f375a41
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 25 additions and 3 deletions

View File

@ -1,4 +1,7 @@
---
# Key base for production cookies
starterpack_secret_key_base: ~
# required service env variables
starterpack_google_product_id: 'starterpack.0'
starterpack_google_package_name: 'im.status.ethereum'
@ -23,6 +26,10 @@ starterpack_app_image: 'statusteam/starterpack:{{ starterpack_app_tag }}'
starterpack_app_vol: '{{ starterpack_service_path }}/app'
starterpack_app_port: 3000
# Sideqik for running jobs
starterpack_queue_name: '{{ starterpack_service_name }}-queue'
starterpack_queue_image: '{{ starterpack_app_image }}'
# PostgreSQL for data storage
starterpack_db_cont_name: '{{ starterpack_service_name }}-db'
starterpack_db_tag: '9.6-alpine'

View File

@ -7,7 +7,7 @@
app:
container_name: '{{ starterpack_app_name }}'
image: '{{ starterpack_app_image }}'
restart: 'on-failure'
restart: 'always'
env_file: '{{ starterpack_service_path }}/app.env'
deploy:
labels:
@ -20,12 +20,27 @@
depends_on:
- 'db'
- 'cache'
- 'queue'
queue:
container_name: '{{ starterpack_queue_name }}'
image: '{{ starterpack_queue_image }}'
restart: 'always'
env_file: '{{ starterpack_service_path }}/app.env'
command: 'sidekiq'
deploy:
labels:
# automatic image updates
com.centurylinklabs.watchtower.enable: 'true'
depends_on:
- 'db'
- 'cache'
db:
container_name: '{{ starterpack_db_cont_name }}'
image: '{{ starterpack_db_image }}'
user: root
restart: 'on-failure'
restart: 'always'
env_file: '{{ starterpack_service_path }}/db.env'
tmpfs:
- '/run/postgresql'
@ -36,7 +51,7 @@
cache:
container_name: '{{ starterpack_cache_name }}'
image: '{{ starterpack_cache_image }}'
restart: 'on-failure'
restart: 'always'
# docker-entrypoint.sh tries to chown /data which will not work
entrypoint: redis-server
volumes: