Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commitabeda6c

Browse files
committed
dev pre-release
1 parent99bdcc4 commitabeda6c

File tree

8 files changed

+347
-3
lines changed

8 files changed

+347
-3
lines changed

‎docker/dev/Dockerfile‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@ From bitwalker/alpine-elixir-phoenix:latest
22

33
RUN mkdir /root/mastani_server
44
RUN mkdir /root/mastani_web
5+
RUN mkdir /root/mastani_api_monitor
56

6-
RUN npm install -g http-server
7+
RUN npm install -g http-server --registry=https://registry.npm.taobao.org
78
ADD mastani_server.tar.gz /root/mastani_server
89
ADD mastani_web.tar.gz /root/mastani_web
10+
11+
ADD monitor/index.js /root/mastani_api_monitor
12+
ADD monitor/package.json /root/mastani_api_monitor
13+
ADD monitor/package-lock.json /root/mastani_api_monitor
14+
RUN cd /root/mastani_api_monitor/ && npm install --registry=https://registry.npm.taobao.org
15+
916
ADD loader.sh /user/local/bin/loader.sh
1017
RUN chmod +x /user/local/bin/loader.sh
1118
CMD ["/user/local/bin/loader.sh"]

‎docker/dev/loader.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ cd /root/mastani_server/
44
MIX_ENV=dev mix phx.server&
55

66
cd /root/mastani_web/
7-
http-server -p 5000 -s&
7+
http-server -p 5001 -s&
8+
9+
cd /root/mastani_api_monitor/
10+
node index&
811

912
whiletrue
1013
do

‎docker/dev/mastani_web.tar.gz‎

-8.5 KB
Binary file not shown.

‎docker/dev/monitor/index.js‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
require('dotenv').config()
2+
3+
const{ ApolloEngineLauncher}=require('apollo-engine')
4+
5+
// Define the Engine configuration.
6+
constlauncher=newApolloEngineLauncher({
7+
apiKey:process.env.APOLLO_KEY,
8+
origins:[
9+
{
10+
http:{
11+
/* url: 'http://localhost:4001/graphiql',*/
12+
url:process.env.APOLLO_ORIGIN,
13+
overrideRequestHeaders:{
14+
/* Host: 'api.coderplanets.com',*/
15+
/* Host: 'coderplanets.com',*/
16+
/* Host: 'coderplanets.com',*/
17+
/* 'content-type': 'application/json',*/
18+
/* Origin: 'http://localhost:3000',*/
19+
/* special: 'Special header value',*/
20+
/* authorization: 'Bearer autk',*/
21+
},
22+
},
23+
},
24+
],
25+
logging:{
26+
/* level: 'INFO',*/
27+
level:'ERROR',
28+
/* level: 'INFO', */
29+
/* level: 'WARN', */
30+
/*
31+
request: {
32+
destination: 'STDOUT',
33+
},
34+
query: {
35+
destination: 'STDOUT',
36+
},
37+
*/
38+
},
39+
frontends:[
40+
{
41+
/* parse evn-var issue */
42+
port:parseInt(process.env.APOLLO_FRONT_PORT.slice(1,-1)),
43+
endpoints:['/graphiql'],
44+
},
45+
],
46+
})
47+
48+
// Start the Proxy; crash on errors.
49+
launcher.start().catch(err=>{
50+
throwerr
51+
})

‎docker/dev/monitor/package-lock.json‎

Lines changed: 265 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docker/dev/monitor/package.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name":"mastani_engine",
3+
"version":"1.0.0",
4+
"description":"",
5+
"main":"index.js",
6+
"scripts": {
7+
"test":"echo\"Error: no test specified\" && exit 1"
8+
},
9+
"author":"",
10+
"license":"ISC",
11+
"dependencies": {
12+
"apollo-engine":"^1.0.4-0",
13+
"apollo-server-express":"^1.3.2",
14+
"dotenv":"^5.0.1"
15+
}
16+
}

‎docker/production/Dockerfile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ RUN mkdir /root/mastani_api_monitor
66

77
RUN npm install -g http-server --registry=https://registry.npm.taobao.org
88
ADD mastani_server.tar.gz /root/mastani_server
9+
ADD mastani_web.tar.gz /root/mastani_web
10+
911
ADD monitor/index.js /root/mastani_api_monitor
1012
ADD monitor/package.json /root/mastani_api_monitor
1113
ADD monitor/package-lock.json /root/mastani_api_monitor
1214
RUN cd /root/mastani_api_monitor/ && npm install --registry=https://registry.npm.taobao.org
13-
ADD index.html /root/mastani_web
15+
1416
ADD loader.sh /user/local/bin/loader.sh
1517
RUN chmod +x /user/local/bin/loader.sh
1618
CMD ["/user/local/bin/loader.sh"]
13.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp