Add dummy-emitter
(not functioning in current state)
This commit is contained in:
parent
08a261e491
commit
82b91e7161
69
docker-compose.yml
Normal file
69
docker-compose.yml
Normal file
@ -0,0 +1,69 @@
|
||||
version: '3.7'
|
||||
|
||||
# All keys here are for dev instance only, do not put prod keys here
|
||||
# To override and use inventory from prod use .env file
|
||||
|
||||
x-common: &common
|
||||
AWS_ACCESS_KEY_ID: kspace-mugshot
|
||||
AWS_SECRET_ACCESS_KEY: 2mSI6HdbJ8
|
||||
ME_CONFIG_MONGODB_ENABLE_ADMIN: 'true'
|
||||
ME_CONFIG_MONGODB_SERVER: '127.0.0.1'
|
||||
ME_CONFIG_MONGODB_AUTH_DATABASE: admin
|
||||
MONGO_URI: mongodb://127.0.0.1:27017/default?replicaSet=rs0
|
||||
MONGO_COLLECTION: eventlog
|
||||
MINIO_ACCESS_KEY: kspace-mugshot
|
||||
MINIO_SECRET_KEY: 2mSI6HdbJ8
|
||||
MINIO_DEFAULT_BUCKETS: kspace-mugshot:download
|
||||
MINIO_CONSOLE_PORT_NUMBER: 9001
|
||||
MINIO_URI: 'https://kspace-mugshot:2mSI6HdbJ8@127.0.0.1:9000/kspace-mugshot'
|
||||
|
||||
|
||||
|
||||
services:
|
||||
|
||||
mongoexpress:
|
||||
restart: always
|
||||
image: mongo-express
|
||||
network_mode: host
|
||||
environment: *common
|
||||
|
||||
mongo:
|
||||
network_mode: host
|
||||
image: mongo:latest
|
||||
volumes:
|
||||
- ./mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
|
||||
command: mongod --replSet rs0 --bind_ip 127.0.0.1
|
||||
|
||||
node-server:
|
||||
restart: always
|
||||
network_mode: host
|
||||
build:
|
||||
context: ./backend
|
||||
environment: *common
|
||||
|
||||
nginx-react:
|
||||
restart: always
|
||||
network_mode: host
|
||||
build:
|
||||
context: ./frontend
|
||||
|
||||
prometheus:
|
||||
network_mode: host
|
||||
image: prom/prometheus:latest
|
||||
command:
|
||||
- --config.file=/config/prometheus.yml
|
||||
volumes:
|
||||
- ./config:/config:ro
|
||||
|
||||
minio:
|
||||
restart: always
|
||||
network_mode: host
|
||||
image: bitnami/minio:latest
|
||||
environment: *common
|
||||
|
||||
emitter:
|
||||
restart: always
|
||||
network_mode: host
|
||||
build:
|
||||
context: ./emitter
|
||||
entrypoint: /emitter/camtiler.py
|
6
emitter/Dockerfile
Normal file
6
emitter/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM python
|
||||
WORKDIR /emitter
|
||||
COPY ./emitter.py ./
|
||||
ENTRYPOINT emitter.py
|
||||
|
||||
LABEL name="emitter"
|
13
emitter/emitter.py
Normal file
13
emitter/emitter.py
Normal file
@ -0,0 +1,13 @@
|
||||
from pymongo import MongoClient
|
||||
from bson.objectid import ObjectId
|
||||
from time import sleep
|
||||
|
||||
MONGO_URI="mongodb://127.0.0.1:27017"
|
||||
|
||||
client = MongoClient(MONGO_URI)
|
||||
db = client['default']
|
||||
col = db['eventlog']
|
||||
|
||||
while True:
|
||||
col.insertOne({"foo": "bar"})
|
||||
sleep(1)
|
Loading…
Reference in New Issue
Block a user