asciinema.org/docker-compose.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

version: '2'
# Quickstart:
2017-04-13 14:44:35 +00:00
# docker-compose up -d web
# docker-compose run --rm db_init
# 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
2017-04-13 13:56:37 +00:00
redis:
image: redis
2017-04-13 14:44:35 +00:00
container_name: asciinema_redis
2017-04-13 13:56:37 +00:00
sidekiq:
image: asciinema/asciinema.org
2017-04-13 14:44:35 +00:00
container_name: asciinema_worker
links:
- redis
- postgres
environment:
DATABASE_URL: "postgresql://postgres:mypass@postgres/asciinema"
REDIS_URL: "redis://redis:6379"
HOST: "localhost:3000"
command: "ruby start_sidekiq.rb"
volumes:
- /tmp/asciinema/uploads:/app/uploads
2017-04-13 14:44:35 +00:00
web:
image: asciinema/asciinema.org
2017-04-13 14:44:35 +00:00
container_name: asciinema_web
links:
- redis
- postgres
depends_on:
- sidekiq
environment:
DATABASE_URL: "postgresql://postgres:mypass@postgres/asciinema"
REDIS_URL: "redis://redis:6379"
HOST: "localhost:3000" # replace with actual hostname/ip.... ${HOSTNAME} doesn't seem to work..
ports:
2017-04-13 13:56:50 +00:00
- "3000:80"
volumes:
- /tmp/asciinema/uploads:/app/uploads
db_init:
image: asciinema/asciinema.org
links:
- postgres
environment:
DATABASE_URL: "postgresql://postgres:mypass@postgres/asciinema"
command: "bundle exec rake db:setup"