Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ RUN npm install
COPY . .
RUN npm run build

FROM nginxinc/nginx-unprivileged:stable-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
#FROM nginxinc/nginx-unprivileged:stable-alpine
#COPY --from=builder /app/dist /usr/share/nginx/html

FROM joseluisq/static-web-server:latest
COPY --from=builder /app/dist /public
16 changes: 15 additions & 1 deletion docker-compose.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
nanme: document
services:
document:
image: ghcr.io/ranui/document:latest
container_name: document
ports:
- 8080:8080
- 8080:80
# 进阶配置
# volumes:
# # 证书
# - 证书路径:/ssl
# environment:
# # 账号
# # 格式用户名:密码,必须使用BCrypt密码哈希函数对密码进行编码。
# # 获取BCrypt加密的结果,把加密结果中的$替换成$$转义。
# SERVER_BASIC_AUTH: "用户名:BCrypt加密密码"
# # 证书
# SERVER_HTTP2_TLS: true
# SERVER_HTTP2_TLS_CERT: 证书路径
# SERVER_HTTP2_TLS_KEY: 私钥路径
29 changes: 27 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,40 @@ This project provides foundational services for document preview components in t

```bash
# docker run
docker run -d --name document -p 8080:8080 ghcr.io/ranui/document:latest
docker run -d --name document -p 8080:80 ghcr.io/ranui/document:latest

# docker compose
services:
document:
image: ghcr.io/ranui/document:latest
container_name: document
ports:
- 8080:8080
- 8080:80
```

#### Advanced Configuration

```yaml
nanme: document
services:
document:
image: ghcr.io/ranui/document:latest
container_name: document
ports:
- 8080:80
# Advanced Configuration
volumes:
# Add certificates
- certificate_path:/ssl
environment:
# Set account
# Format username:password, password must be encoded using BCrypt hash function.
# To get BCrypt encryption result, replace $ in the encrypted result with $$ for escaping.
SERVER_BASIC_AUTH: "username:BCrypt_encrypted_password"
# Use certificate
SERVER_HTTP2_TLS: true
SERVER_HTTP2_TLS_CERT: certificate_path
SERVER_HTTP2_TLS_KEY: private_key_path
```

### Important Notes
Expand Down
29 changes: 27 additions & 2 deletions readme.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,40 @@

```bash
# docker run
docker run -d --name document -p 8080:8080 ghcr.io/ranui/document:latest
docker run -d --name document -p 8080:80 ghcr.io/ranui/document:latest

# docker compose
services:
document:
image: ghcr.io/ranui/document:latest
container_name: document
ports:
- 8080:8080
- 8080:80
```

#### 进阶配置

```yaml
nanme: document
services:
document:
image: ghcr.io/ranui/document:latest
container_name: document
ports:
- 8080:80
# 进阶配置
volumes:
# 添加证书
- 证书路径:/ssl
environment:
# 设置账号
# 格式用户名:密码,必须使用BCrypt密码哈希函数对密码进行编码。
# 获取BCrypt加密的结果,把加密结果中的$替换成$$转义。
SERVER_BASIC_AUTH: "用户名:BCrypt加密密码"
# 使用证书
SERVER_HTTP2_TLS: true
SERVER_HTTP2_TLS_CERT: 证书路径
SERVER_HTTP2_TLS_KEY: 私钥路径
```

### 重要提示
Expand Down
Loading