Skip to content
Snippets Groups Projects
Commit aafcf6cd authored by Lyuben Penkovski's avatar Lyuben Penkovski
Browse files

Add some predefined task templates for development

parent a96f7974
No related branches found
No related tags found
1 merge request!9Add some predefined task templates for development
......@@ -26,6 +26,8 @@ services:
- ./env/task.env
ports:
- "8082:8080"
depends_on:
- mongo
cache:
container_name: cache
......@@ -66,7 +68,6 @@ services:
container_name: mongo
image: mongo:3.6
environment:
MONGO_INITDB_DATABASE: policy
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
......
......@@ -2,4 +2,7 @@ HTTP_HOST=""
HTTP_PORT="8080"
HTTP_IDLE_TIMEOUT="120s"
HTTP_READ_TIMEOUT="10s"
HTTP_WRITE_TIMEOUT="10s"
\ No newline at end of file
HTTP_WRITE_TIMEOUT="10s"
MONGO_ADDR="mongodb://mongo:27017/task?authSource=admin"
MONGO_USER="root"
MONGO_PASS="root"
b = db.getSiblingDB('policy');
db = db.getSiblingDB('policy');
db.createCollection('policies');
db.policies.insertMany(
[
......@@ -17,3 +17,19 @@ db.policies.insertMany(
},
]
);
db = db.getSiblingDB('task');
db.createCollection('taskTemplates');
db.taskTemplates.insertMany(
[
{
"name":"didResolve",
"url":"{{didResolveURL}}",
"method":"POST",
"requestPolicy":"",
"responsePolicy":"",
"finalPolicy":"",
"cacheKey":"didResolve",
},
]
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment