master
 1version: '2'
 2services:
 3  www:
 4    image: nginx:latest
 5    volumes:
 6      - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
 7      - ./public:/var/www/public
 8      - ./config/nginx/server.crt:/etc/nginx/server.crt
 9      - ./config/nginx/server.key:/etc/nginx/server.key
10    links:
11      - web
12    ports:
13      - "80:80"
14      - "443:443"
15  web:
16    build: .
17    command: bundle exec foreman start web
18    volumes:
19      - .:/app
20    links:
21      - redis
22      - db
23    depends_on:
24      - redis
25      - db
26    environment:
27      - REDIS_URL=redis://redis:6379/12
28      - RAILS_LOG_TO_STDOUT=true
29  db:
30    image: postgres:latest
31    ports:
32      - "5432:5432"
33    volumes:
34      - ./db/data:/var/lib/postgresql/data
35  redis:
36    image: redis:latest
37    ports:
38      - "6379:6379"