1
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
/.idea/*
|
||||
*.db
|
||||
web/node_modules/
|
||||
web/dist/
|
||||
# web/dist/ 已提交至 git,由 Go 服务统一暴露
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# === Stage 1: 构建后端 ===
|
||||
FROM golang:1.26-alpine AS builder
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o pointly-tel .
|
||||
|
||||
# === Stage 2: 运行 ===
|
||||
FROM alpine:3.19
|
||||
WORKDIR /app
|
||||
COPY --from=builder /build/pointly-tel .
|
||||
COPY --from=builder /build/web/dist ./web/dist
|
||||
COPY config.yml .
|
||||
EXPOSE 3000
|
||||
CMD ["./pointly-tel"]
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
server:
|
||||
address: :3000
|
||||
address: :80
|
||||
name: pointly-tel
|
||||
amap:
|
||||
api_key: "884d33aef9842e60b840e2b2b6aedce9"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
pointly-tel:
|
||||
build: .
|
||||
container_name: pointly-tel
|
||||
ports:
|
||||
- "80:80"
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
- ./config.yml:/app/config.yml:ro
|
||||
restart: unless-stopped
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+38
File diff suppressed because one or more lines are too long
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Pointly-Tel - 高德POI商户查询</title>
|
||||
<script type="module" crossorigin src="/assets/index-fNB4NbEb.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-C6NseWna.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user