You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.9 KiB
106 lines
2.9 KiB
version: "2.3" |
|
services: |
|
data: |
|
image: busybox |
|
volumes: |
|
- .:/var/www |
|
- ${DATA_DIR_PATH}/bundle:/bundle |
|
- ${DATA_DIR_PATH}/.bundle:/var/www/.bundle |
|
- ${DATA_DIR_PATH}/public/assets:/var/www/public/assets |
|
- ${DATA_DIR_PATH}/public/packs:/var/www/public/packs |
|
- ${DATA_DIR_PATH}/public/system:/var/www/public/system |
|
- ${DATA_DIR_PATH}/storage:/var/www/storage |
|
- ${DATA_DIR_PATH}/tmp:/var/www/tmp |
|
- ${DATA_DIR_PATH}/vendor/bundle:/var/www/vendor/bundle |
|
- ${DATA_DIR_PATH}/node_modules:/var/www/node_modules |
|
load_balancer: |
|
restart: ${WEB_RESTART_MODE} |
|
image: dockercloud/haproxy |
|
links: |
|
- web |
|
volumes: |
|
- /var/run/docker.sock:/var/run/docker.sock |
|
ports: |
|
- "${WEB_RAILS_PORT}:80" |
|
redis: |
|
image: tenshiamd/redis:5-alpine |
|
restart: ${WEB_RESTART_MODE} |
|
command: redis-server |
|
volumes: |
|
- ${DATA_DIR_PATH}/redis:/var/lib/redis |
|
solr: |
|
restart: ${WEB_RESTART_MODE} |
|
image: tenshiamd/solr:5-alpine |
|
ports: |
|
- ${SOLR_PORT}:8983 |
|
volumes: |
|
- ${DATA_DIR_PATH}/solr:/var/lib/solr |
|
web: |
|
restart: ${WEB_RESTART_MODE} |
|
image: tenshiamd/ruby:2.7-alpine |
|
command: | |
|
bash -c 'bash -s <<EOF |
|
bundle check || bundle install |
|
bundle exec rake db:migrate |
|
bundle exec foreman start -f Procfile-prod |
|
EOF' |
|
volumes_from: |
|
- data |
|
depends_on: |
|
- solr |
|
- redis |
|
environment: |
|
- RAILS_ENV=${WEB_RAILS_ENV} |
|
- RAILS_MASTER_KEY=${WEB_RAILS_MASTER_KEY} |
|
- RAILS_LOG_TO_STDOUT=true |
|
- PORT=80 |
|
worker: |
|
restart: ${WEB_RESTART_MODE} |
|
image: tenshiamd/ruby:2.7-alpine |
|
command: | |
|
bash -c 'bash -s <<EOF |
|
bundle check || bundle install |
|
bundle exec rake db:migrate |
|
bundle exec foreman start -f Procfile-worker |
|
EOF' |
|
volumes_from: |
|
- data |
|
depends_on: |
|
- solr |
|
- redis |
|
environment: |
|
- RAILS_ENV=${WEB_RAILS_ENV} |
|
- RAILS_MASTER_KEY=${WEB_RAILS_MASTER_KEY} |
|
- RAILS_LOG_TO_STDOUT=true |
|
- PORT=80 |
|
- SIDEKIQ_QUEUES=-q default,2 -q mailers,1 -q active_storage_analysis,1 -q active_storage_purge,1 |
|
healthcheck: |
|
test: ["CMD", "curl", "-f", "${WORKER_HEALTHCHECK_URL}"] |
|
interval: 30s |
|
retries: 3 |
|
start_period: 30s |
|
worker_solr: |
|
restart: ${WEB_RESTART_MODE} |
|
image: tenshiamd/ruby:2.7-alpine |
|
command: | |
|
bash -c 'bash -s <<EOF |
|
bundle check || bundle install |
|
bundle exec rake db:migrate |
|
bundle exec foreman start -f Procfile-worker |
|
EOF' |
|
volumes_from: |
|
- data |
|
depends_on: |
|
- solr |
|
- redis |
|
environment: |
|
- RAILS_ENV=${WEB_RAILS_ENV} |
|
- RAILS_MASTER_KEY=${WEB_RAILS_MASTER_KEY} |
|
- RAILS_LOG_TO_STDOUT=true |
|
- PORT=80 |
|
- SIDEKIQ_QUEUES=-q sunspot_index,2 |
|
healthcheck: |
|
test: ["CMD", "curl", "-f", "${WORKER_HEALTHCHECK_URL}"] |
|
interval: 30s |
|
retries: 3 |
|
start_period: 30s
|
|
|