mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 16:16:37 +08:00
migrate 3000
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
# ──────────────────────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
# ─── Docker Compose 服务端口映射 ───────────────────────────────────────────────
|
# ─── Docker Compose 服务端口映射 ───────────────────────────────────────────────
|
||||||
APP_PORT=8000
|
APP_PORT=3000
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
JAEGER_UI_PORT=16686
|
JAEGER_UI_PORT=16686
|
||||||
@@ -23,7 +23,7 @@ TZ=Asia/Shanghai
|
|||||||
# ─── 应用配置 ──────────────────────────────────────────────────────────────────
|
# ─── 应用配置 ──────────────────────────────────────────────────────────────────
|
||||||
APP_NAME=wavelet
|
APP_NAME=wavelet
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
APP_ADDR=:8000
|
APP_ADDR=:3000
|
||||||
APP_NODE_ID=1
|
APP_NODE_ID=1
|
||||||
APP_API_PREFIX=/api
|
APP_API_PREFIX=/api
|
||||||
# APP_GRACEFUL_SHUTDOWN_TIMEOUT=30
|
# APP_GRACEFUL_SHUTDOWN_TIMEOUT=30
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
app:
|
app:
|
||||||
app_name: "wavelet"
|
app_name: "wavelet"
|
||||||
env: "development" # development | testing | production
|
env: "development" # development | testing | production
|
||||||
addr: ":8000"
|
addr: ":3000"
|
||||||
node_id: 1 # Snowflake node ID (0-1023). Must be unique per instance.
|
node_id: 1 # Snowflake node ID (0-1023). Must be unique per instance.
|
||||||
graceful_shutdown_timeout: 30
|
graceful_shutdown_timeout: 30
|
||||||
session_cookie_name: "wavelet_session_id" # Change to something unique before deploy
|
session_cookie_name: "wavelet_session_id" # Change to something unique before deploy
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
OTEL_EXPORTER_OTLP_INSECURE: ${OTEL_EXPORTER_OTLP_INSECURE:-true}
|
OTEL_EXPORTER_OTLP_INSECURE: ${OTEL_EXPORTER_OTLP_INSECURE:-true}
|
||||||
OTEL_SAMPLING_RATE: ${OTEL_SAMPLING_RATE:-1.0}
|
OTEL_SAMPLING_RATE: ${OTEL_SAMPLING_RATE:-1.0}
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT:-8000}:8000"
|
- "${APP_PORT:-3000}:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./uploads:/app/uploads
|
- ./uploads:/app/uploads
|
||||||
- ./data/sqlite:/app/data
|
- ./data/sqlite:/app/data
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ WORKDIR /app
|
|||||||
COPY --from=backend-builder /out/wavelet ./wavelet
|
COPY --from=backend-builder /out/wavelet ./wavelet
|
||||||
COPY docs ./docs
|
COPY docs ./docs
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENTRYPOINT ["./wavelet"]
|
ENTRYPOINT ["./wavelet"]
|
||||||
CMD ["all"]
|
CMD ["all"]
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ WORKDIR /app
|
|||||||
COPY --from=builder /out/wavelet ./wavelet
|
COPY --from=builder /out/wavelet ./wavelet
|
||||||
COPY docs ./docs
|
COPY docs ./docs
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENTRYPOINT ["./wavelet"]
|
ENTRYPOINT ["./wavelet"]
|
||||||
CMD ["api"]
|
CMD ["api"]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
WAVELET_FRONTEND_URL=http://localhost:3000
|
WAVELET_FRONTEND_URL=http://localhost:3000
|
||||||
|
|
||||||
# 后端 URL
|
# 后端 URL
|
||||||
WAVELET_BACKEND_URL=http://localhost:8000
|
WAVELET_BACKEND_URL=http://localhost:3000
|
||||||
|
|
||||||
# Session Cookie
|
# Session Cookie
|
||||||
WAVELET_SESSION_COOKIE_NAME=wavelet_session_id
|
WAVELET_SESSION_COOKIE_NAME=wavelet_session_id
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export const howToUseSections: PolicySection[] = [
|
|||||||
<p className="font-semibold text-xs text-muted-foreground">方式一:Authorization Bearer 头</p>
|
<p className="font-semibold text-xs text-muted-foreground">方式一:Authorization Bearer 头</p>
|
||||||
<CodeBlock
|
<CodeBlock
|
||||||
code={`GET /api/v1/user/self HTTP/1.1
|
code={`GET /api/v1/user/self HTTP/1.1
|
||||||
Host: localhost:8000
|
Host: localhost:3000
|
||||||
Authorization: Bearer at_628d022b7a95e26b...`}
|
Authorization: Bearer at_628d022b7a95e26b...`}
|
||||||
language="http"
|
language="http"
|
||||||
/>
|
/>
|
||||||
@@ -77,7 +77,7 @@ Authorization: Bearer at_628d022b7a95e26b...`}
|
|||||||
<p className="font-semibold text-xs text-muted-foreground">方式二:X-Access-Token 自定义头</p>
|
<p className="font-semibold text-xs text-muted-foreground">方式二:X-Access-Token 自定义头</p>
|
||||||
<CodeBlock
|
<CodeBlock
|
||||||
code={`GET /api/v1/user/self HTTP/1.1
|
code={`GET /api/v1/user/self HTTP/1.1
|
||||||
Host: localhost:8000
|
Host: localhost:3000
|
||||||
X-Access-Token: at_628d022b7a95e26b...`}
|
X-Access-Token: at_628d022b7a95e26b...`}
|
||||||
language="http"
|
language="http"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
export function getApiBaseUrl(): string {
|
export function getApiBaseUrl(): string {
|
||||||
if (typeof window === 'undefined') {
|
if (typeof window === 'undefined') {
|
||||||
return process.env.WAVELET_BACKEND_URL || process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || 'http://localhost:8000';
|
return process.env.WAVELET_BACKEND_URL || process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || 'http://localhost:3000';
|
||||||
}
|
}
|
||||||
return process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || '';
|
return process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const nextConfig: NextConfig = {
|
|||||||
},
|
},
|
||||||
...(isExport ? { output: 'export' } : {
|
...(isExport ? { output: 'export' } : {
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
const backendUrl = process.env.WAVELET_BACKEND_URL || 'http://localhost:8000';
|
const backendUrl = process.env.WAVELET_BACKEND_URL || 'http://localhost:3000';
|
||||||
return [
|
return [
|
||||||
// 上传文件静态资源
|
// 上传文件静态资源
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS of_dns_accounts (
|
|||||||
id BIGSERIAL PRIMARY KEY,
|
id BIGSERIAL PRIMARY KEY,
|
||||||
name VARCHAR(255) NOT NULL,
|
name VARCHAR(255) NOT NULL,
|
||||||
type VARCHAR(64) NOT NULL,
|
type VARCHAR(64) NOT NULL,
|
||||||
authorization TEXT NOT NULL,
|
"authorization" TEXT NOT NULL,
|
||||||
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ sidebar: false
|
|||||||
- 新增 OpenFlare 业务表 goose 迁移(`of_options`、`of_origins`、`of_proxy_routes`、`of_nodes`、`of_waf_*`、`of_tls_*`、`of_config_versions`、`of_pages_*`、`of_apply_logs` 等)。
|
- 新增 OpenFlare 业务表 goose 迁移(`of_options`、`of_origins`、`of_proxy_routes`、`of_nodes`、`of_waf_*`、`of_tls_*`、`of_config_versions`、`of_pages_*`、`of_apply_logs` 等)。
|
||||||
- 重叠职能复用 Wavelet 内置用户/OAuth/Cap/认证源能力;新增 `integration` 包覆盖认证、核心链路、安全、Agent 协议集成测试。
|
- 重叠职能复用 Wavelet 内置用户/OAuth/Cap/认证源能力;新增 `integration` 包覆盖认证、核心链路、安全、Agent 协议集成测试。
|
||||||
- 修复 Wavelet 引入 `openflare` 模块后 `gomodule/redigo v2.0.0+incompatible` 导致 `redistore` 编译失败的问题。
|
- 修复 Wavelet 引入 `openflare` 模块后 `gomodule/redigo v2.0.0+incompatible` 导致 `redistore` 编译失败的问题。
|
||||||
|
- Wavelet 后端默认监听端口由 `:8000` 调整为 `:3000`,与旧 OpenFlare Server 保持一致。
|
||||||
|
|
||||||
## [v2.3.4] - 2026-06-17
|
## [v2.3.4] - 2026-06-17
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user