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.
 
 
 
 
 

53 lines
1.5 KiB

version: "2"
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:
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:
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
environment:
- RAILS_ENV=${WEB_RAILS_ENV}
- RAILS_MASTER_KEY=${WEB_RAILS_MASTER_KEY}
- RAILS_LOG_TO_STDOUT=true
- PORT=80