Skip to content

Commit 0c7333f

Browse files
committed
feat: 云文档docker配置与开发环境上下文
1 parent a7e722c commit 0c7333f

File tree

10 files changed

+1814
-2279
lines changed

10 files changed

+1814
-2279
lines changed

.ep.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
OPENID_CONNECT_ID=
2+
OPENID_CONNECT_SECRET=
3+
OPENID_CONNECT_BASEURL=

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
public
33
.env
4+
.ep.env

docker-compose.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
REQUIRE_AUTHENTICATION=true
2+
PAD_OPTIONS_SHOW_LINE_NUMBERS=false
3+
DEFAULT_PAD_TEXT="欢迎使用 Tailchat 云文档。\n官网: https://tailchat.msgbyte.com\n"
4+
5+
# openid auth
6+
OPENID_CONNECT_ISSUER=https://paw-server-nightly.moonrailgun.com/open/
7+
OPENID_CONNECT_ID=
8+
OPENID_CONNECT_SECRET=
9+
OPENID_CONNECT_BASEURL=https://paw-server-nightly.moonrailgun.com/ep/

docker-compose.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ services:
1414
networks:
1515
- tailchat
1616

17+
tailchat-etherpad:
18+
build:
19+
context: ./etherpad-lite
20+
env_file:
21+
- "docker-compose.env"
22+
- ".ep.env"
23+
image: tailchat-etherpad
24+
environment:
25+
DB_TYPE: mongodb
26+
DB_URL: mongodb://mongo:27017/tailchat_ep
27+
labels:
28+
- "traefik.enable=true"
29+
- "traefik.http.routers.ep.rule=PathPrefix(`/ep/`)"
30+
- "traefik.http.services.ep.loadbalancer.server.port=9001"
31+
- "traefik.http.middlewares.ep-prefix.stripprefix.prefixes=/ep/"
32+
- "traefik.http.routers.ep.middlewares=ep-prefix"
33+
networks:
34+
- tailchat
35+
1736
networks:
1837
tailchat:
1938
external:

etherpad-lite

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
"author": "moonrailgun",
44
"private": true,
55
"scripts": {
6-
"dev": "concurrently --handle-input npm:dev:service npm:dev:web",
6+
"dev": "concurrently --handle-input npm:dev:service npm:dev:web npm:dev:web:http",
77
"dev:service": "ts-node ./runner.ts",
8-
"dev:web": "http-server -c-1 -p 12010 ./public",
8+
"dev:web": "cd plugins/com.msgbyte.docs && npm run build:web:watch",
9+
"dev:web:http": "http-server -c-1 -p 22010 ./public",
910
"postinstall": "git submodule init && git submodule update"
1011
},
1112
"dependencies": {
12-
"tailchat-server-sdk": "^0.0.10"
13+
"tailchat-server-sdk": "latest"
1314
},
1415
"devDependencies": {
1516
"@types/node": "^17.0.21",

0 commit comments

Comments
 (0)