Skip to content

Instantly share code, notes, and snippets.

@gillesdemey
Last active February 11, 2019 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gillesdemey/d546581453b941580adc9b2437c265ea to your computer and use it in GitHub Desktop.
Save gillesdemey/d546581453b941580adc9b2437c265ea to your computer and use it in GitHub Desktop.
Collector Compose

Collector Compose

Prerequisites

⚠️ Make sure you have hoard-compose running ⚠️

This application will join the docker network created by hoard-compose, or manually create it using docker network create waylay.

Start application

Run docker-compose up

OAuth

You must first have authenticate a user via Hoard.

See README.md in hoard-compose.

JWT Token

In case you need to make manual REST API calls, you can use the following token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJiZXN0LWJ1eS1zdGFnaW5nLndheWxheS5pbyIsImlhdCI6MTUyMTgwMjY4OCwiaXNzIjoiQHdheWxheS9hdXRoL3YxLjUuNiIsInN1YiI6ImFwcGxpY2F0aW9ucy9mYzMwYjJiZS0xMDVhLTRlYzctOGYyMy1lOGI3MDI5NjdmOWYifQ.RKFKnMcSn9o5-m-cr6y9Bcz06xlia5MB6nQmEVcAYIc
version: '3.6'
services:
api:
container_name: collector-api
image: eu.gcr.io/quiet-mechanic-140114/collector-api:stable
environment:
- REDIS_HOST=collector-redis
- PINO_LOG_LEVEL=debug
- JWTSECRET=foobar
- HOARD_URL=http://hoard:3001
- LOCAL_PKG_PATH=collectors/
volumes:
- ./collectors/:/app/collectors
ports:
- "3000:3000"
depends_on:
- redis
- workers
- scheduler
networks:
- waylay
workers:
container_name: collector-workers
image: eu.gcr.io/quiet-mechanic-140114/collector-queue:stable
environment:
- REDIS_HOST=redis
- LOCAL_HANDLERS_PATH=handlers/
- LOCAL_PKG_PATH=collectors/
volumes:
- ./collectors/:/app/collectors
- ./handlers/:/app/handlers
depends_on:
- redis
networks:
- waylay
scheduler:
container_name: collector-scheduler
image: eu.gcr.io/quiet-mechanic-140114/collector-scheduler:stable
environment:
- REDIS_HOST=redis
- REDIS_SCHEDULER_HOST=redis
links:
- redis
depends_on:
- redis
networks:
- waylay
redis:
container_name: collector-redis
image: redis:3-alpine
networks:
waylay:
aliases:
- collector-redis
networks:
waylay:
external:
name: waylay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment