You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/docker-compose.yml

77 lines
1.6 KiB
YAML

version: '2'
# Quickstart:
# docker-compose run --rm db_init
# docker-compose up -d web
# To cleanup:
# docker-compose stop && docker-compose rm
services:
postgres:
image: postgres
container_name: asciinema_postgres
### Uncomment to enable DB persistence
# volumes:
# - ./postgres:/var/lib/postgresql/data
### See https://hub.docker.com/_/postgres/ for more
### configuration options for this image.
7 years ago
redis:
image: redis
container_name: asciinema_redis
### Uncomment to enable Redis persistence
# volumes:
# - ./redis:/data
### See https://hub.docker.com/_/redis/ for more
### configuration options for this image.
7 years ago
sidekiq:
image: asciinema/asciinema.org
container_name: asciinema_worker
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
env_file: .env.production
### See https://github.com/namshi/docker-smtp for more SMTP configuration
### options for this image.
web:
image: asciinema/asciinema.org
container_name: asciinema_web
links:
- redis
- postgres
- smtp
depends_on:
- sidekiq
env_file: .env.production
ports:
- "3000:80"
volumes:
- /tmp/asciinema/uploads:/app/uploads
db_init:
image: asciinema/asciinema.org
links:
- redis
- postgres
env_file: .env.production
command: "bundle exec rake db:setup"
volumes:
- /tmp/asciinema/uploads:/app/uploads