version: '3'

services:

  memcache:
    image: memcached:1.5-alpine
    command: memcached -m 512
    networks:
      - default

  web:
    image: registry.elbert.us/parsley:production
    restart: unless-stopped
    environment:
      - RAILS_USE_MEMCACHE=true
      - RAILS_LOG_TO_STDOUT=true
      - PASSENGER_APP_ENV=beta
      - RAILS_ENV=beta
      - PARSLEY_PG_PASSWORD=${DB_PASSWORD}
      - SECRET_KEY_BASE=${SECRET_KEY_BASE}
    links:
      - memcache
    networks:
      - default
      - db
      - traefik

networks:
  db:
    external: true

  traefik:
    external: true