This repository has been archived by the owner on Nov 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
service-definitions.js
150 lines (144 loc) · 4.34 KB
/
service-definitions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
var services = {
gateway: {
name: "gateway-service",
commands: {
env: 'project-runner/login.sh prod',
image: 'project-runner/load-image.sh prod'
},
logs: {
directories: ['app/log'],
profiles: {
default: [
'app/log/nginx_access.log',
'app/log/nginx_error.log'
]
}
},
},
entrypoint: {
name: "mock-entrypoint",
commands: {
env: 'project-runner/login.sh prod',
image: 'project-runner/load-image.sh prod'
},
logs: {
directories: ['app/log'],
profiles: {
default: [
'app/log/nginx_access.log',
'app/log/nginx_error.log'
]
}
},
},
sign: {
name: "signing-service",
logs: {
directories: ['app/logs', 'app/logs/server'],
profiles: {
default: [
'app/logs/server/nginx_access.log',
'app/logs/server/nginx_error.log',
'app/logs/penneo_error_dev.log',
'app/logs/penneo_core_dev.log'
]
}
},
port: 8008,
docs: {
publicUrl: "/app_dev.php/api/docs"
}
},
validation: {
name: "validation-service",
logs: {
directories: ['app/logs', 'app/logs/server'],
profiles: {
default: [
'app/logs/server/nginx_access.log',
'app/logs/server/nginx_error.log',
'app/logs/penneo_error_dev.log',
'app/logs/penneo_core_dev.log'
]
}
},
port: 8000,
docs: {
publicUrl: "/app_dev.php/api/docs"
}
},
auth: {
name: "api-auth",
logs: {
directories: ['var/logs', 'app/logs/server'],
profiles: {
default: [
'app/logs/server/nginx_access.log',
'app/logs/server/nginx_error.log',
'var/logs/dev_error.log'
]
}
},
port: 8002,
docs: {
publicUrl: "/app_dev.php/api/doc"
}
},
frontend: {
name: "fe-application-loader",
commands: {
// Use 'nvm use' for the project before running this
// up: 'nvm use v5.11.1 && npm start #aww-frontend', // doesn't seem to be working
up: 'npm start #aww-frontend',
start: 'echo "Use the up command"',
stop: "ps ax | grep \\#aww-frontend | grep -v grep | awk '{print $1}' | xargs -I % kill %",
isRunning: "ps ax | grep \\#aww-frontend | grep -v grep"
}
},
form: {
name: "forms",
logs: {
directories: ['app/logs', 'app/logs/server'],
profiles: {
default: [
'app/logs/server/nginx_access.log',
'app/logs/server/nginx_error.log',
'app/logs/dev_penneo_framework.log',
'app/logs/dev_penneo_workflow.log',
'app/logs/dev_penneo_form.log'
]
}
},
port: 8001,
docs: {
publicUrl: "/app_dev.php/api/doc"
}
},
"pdf-eid": {
name: "pdf-eid"
},
validator: {
name: "validator"
},
sepior: {
name: "SepiorService",
logs: {
directories: ['app/logs']
}
},
// Default settings for the services
COMMAND: {
up : 'project-runner/run.sh dev',
start : 'project-runner/run.sh dev start',
recreate : 'project-runner/run.sh dev up -d --force-recreate',
stop : 'project-runner/run.sh dev stop',
kill : 'project-runner/run.sh dev kill',
env : 'project-runner/login.sh dev',
isRunning : 'docker ps | grep {service-id}',
bootstrap : 'scripts/bootstrap.sh',
exec : "./project-runner/run.sh dev run --rm app sh -c '{{COMMAND}}'",
image : ['project-runner/load-image.sh prod', 'project-runner/load-image.sh dev'
]
}
};
module.exports = services;