app: env_file: .env build: . entrypoint: bundle exec command: rails server -p 3000 volumes: - .:/app ports: - "3000" links: - postgres postgres: env_file: .env image: postgres:9.4 ports: - "5432" nginx: image: nginx links: - app volumes_from: - app volumes: - ./nginx.conf:/etc/nginx/conf.d/my_app.conf:ro ports: - "80:80"