Created
September 12, 2018 16:02
-
-
Save dadicool/a8549f89c7cf975c53665c565049e9cd to your computer and use it in GitHub Desktop.
docker-compose blog post example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
web: | |
image: lifen/railsApp:${VERSION} | |
mem_limit: 1024m | |
ports: | |
- "3000:3000" | |
env_file: | |
- .env.web.production | |
volumes: | |
- "LOCAL_PATH_TO_STORAGE:/myapp/uploads" | |
- "LOCAL_PATH_TO_STORAGE:/myapp/log" | |
command: 'bundle exec rails server -b "0.0.0.0"' | |
restart: unless-stopped | |
logging: | |
driver: syslog | |
options: | |
tag: railsApp-web/json | |
syslog-facility: local0 | |
worker: | |
image: lifen/railsApp:${VERSION} | |
mem_limit: 1536m | |
env_file: | |
- .env.web.production | |
volumes: | |
- "OCAL_PATH_TO_STORAGE:/myapp/log" | |
command: 'bundle exec sidekiq -C config/sidekiq.yml' | |
restart: unless-stopped | |
logging: | |
driver: syslog | |
options: | |
tag: railsApp-worker/json | |
syslog-facility: local0 | |
redis: | |
image: redis:3-alpine | |
mem_limit: 128m | |
ports: | |
- "16379:6379" | |
volumes: | |
- "LOCAL_PATH_TO_REDIS_STORAGE:/data" | |
restart: unless-stopped | |
logging: | |
driver: syslog | |
options: | |
tag: railsAppA_redis | |
syslog-facility: local0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment