core rpc
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.rpc-core image_name:ppanel-rpc-core name:rpc-core]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
Build docker and publish / prepare (20.15.1) (push) Successful in 7s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.rpc-core image_name:ppanel-rpc-core name:rpc-core]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
Build docker and publish / prepare (20.15.1) (push) Successful in 7s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Has been cancelled
This commit is contained in:
+7
-3
@@ -1,5 +1,9 @@
|
||||
MYSQL_DSN=root:pavR2$mX7*tQ@tcp(127.0.0.1:3306)/ppanel?charset=utf8mb4&parseTime=true
|
||||
REDIS_HOST=127.0.0.1:6379
|
||||
PPANEL_REPO=registry.kxsw.us/vpn-server
|
||||
PPANEL_TAG=latest
|
||||
|
||||
# 如果密码包含 $,请写成 $$,避免被 docker compose 当成变量展开
|
||||
MYSQL_DSN=root:replace-with-db-password@tcp(mysql:3306)/ppanel?charset=utf8mb4&parseTime=true
|
||||
REDIS_HOST=redis:6379
|
||||
REDIS_PASS=
|
||||
|
||||
JWT_SECRET=replace-with-strong-secret
|
||||
@@ -8,4 +12,4 @@ APP_SECRET=replace-with-strong-secret
|
||||
SECURITY_SECRET=replace-with-strong-secret
|
||||
NODE_SECRET=replace-with-strong-secret
|
||||
|
||||
CORE_RPC_TARGET=127.0.0.1:8083
|
||||
CORE_RPC_TARGET=ppanel-rpc-core:8083
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY apps/rpc ./apps/rpc
|
||||
COPY pkg ./pkg
|
||||
RUN CGO_ENABLED=0 go build -trimpath -o /ppanel-rpc-core ./apps/rpc/core/core.go
|
||||
|
||||
FROM alpine:3.19
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /ppanel-rpc-core .
|
||||
COPY apps/rpc/core/etc /app/etc
|
||||
|
||||
EXPOSE 8083
|
||||
CMD ["./ppanel-rpc-core", "-f", "etc/core.yaml"]
|
||||
@@ -2,12 +2,27 @@
|
||||
# 镜像由 CI 预先构建并推送到镜像仓库
|
||||
# 本地基础设施 (mysql/redis) 需提前独立部署
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
ppanel-rpc-core:
|
||||
image: ${PPANEL_REPO}/ppanel-rpc-core:${PPANEL_TAG:-latest}
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- "8083:8083"
|
||||
volumes:
|
||||
- ./etc/core:/app/etc
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "50m"
|
||||
max-file: "3"
|
||||
|
||||
ppanel-api:
|
||||
image: ${PPANEL_REPO}/ppanel-api:${PPANEL_TAG:-latest}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- ppanel-rpc-core
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
Name: core.rpc
|
||||
ListenOn: 0.0.0.0:8083
|
||||
Mode: pro
|
||||
|
||||
Log:
|
||||
Mode: file
|
||||
Encoding: json
|
||||
Level: info
|
||||
Path: /var/log/zero-ppanel/rpc-core
|
||||
KeepDays: 15
|
||||
Rotation: daily
|
||||
|
||||
Telemetry:
|
||||
Name: core.rpc
|
||||
Endpoint: http://jaeger:4318/v1/traces
|
||||
Sampler: 0.1
|
||||
Batcher: otlphttp
|
||||
|
||||
DevServer:
|
||||
Enabled: true
|
||||
Port: 6163
|
||||
EnableMetrics: true
|
||||
EnablePprof: false
|
||||
|
||||
MySQL:
|
||||
DataSource: "${MYSQL_DSN}"
|
||||
|
||||
CacheRedis:
|
||||
Host: "${REDIS_HOST}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASS}"
|
||||
Reference in New Issue
Block a user