asciinema.org/docker-compose.yml

85 lines
1.8 KiB
YAML
Raw Normal View History

version: '2'
# Quickstart:
2017-04-15 16:15:52 +00:00
# docker-compose run --rm db_init
2017-04-13 14:44:35 +00:00
# docker-compose up -d web
# To cleanup:
2017-04-13 14:44:35 +00:00
# docker-compose stop && docker-compose rm
services:
postgres:
image: postgres
2017-04-13 14:44:35 +00:00
container_name: asciinema_postgres
restart: unless-stopped
### Uncomment to enable DB persistence
# volumes:
# - ./postgres:/var/lib/postgresql/data
### See https://hub.docker.com/_/postgres/ for more
### configuration options for this image.
2017-04-13 13:56:37 +00:00
redis:
image: redis
2017-04-13 14:44:35 +00:00
container_name: asciinema_redis
restart: unless-stopped
### Uncomment to enable Redis persistence
# volumes:
# - ./redis:/data
### See https://hub.docker.com/_/redis/ for more
### configuration options for this image.
2017-04-13 13:56:37 +00:00
sidekiq:
build: .
image: asciinema/asciinema.org
2017-04-13 14:44:35 +00:00
container_name: asciinema_worker
restart: unless-stopped
links:
- redis
- postgres
- smtp
env_file: .env.production
command: "bundle exec sidekiq"
volumes:
- /tmp/asciinema/uploads:/app/uploads
smtp:
image: namshi/smtp
container_name: asciinema_smtp
restart: unless-stopped
env_file: .env.production
### See https://github.com/namshi/docker-smtp for more SMTP configuration
### options for this image.
2017-04-13 14:44:35 +00:00
web:
build: .
image: asciinema/asciinema.org
2017-04-13 14:44:35 +00:00
container_name: asciinema_web
restart: unless-stopped
links:
- redis
- postgres
- smtp
depends_on:
- sidekiq
env_file: .env.production
ports:
2017-04-13 13:56:50 +00:00
- "3000:80"
volumes:
- /tmp/asciinema/uploads:/app/uploads
db_init:
build: .
image: asciinema/asciinema.org
links:
2017-04-15 16:15:52 +00:00
- redis
- postgres
env_file: .env.production
command: "bundle exec rake db:setup"
2017-04-15 16:15:52 +00:00
volumes:
- /tmp/asciinema/uploads:/app/uploads