Skip to content

Commit 10626c8

Browse files
committed
chore: change default port from 8080 to 8000
- Update fly.toml PORT and internal_port to 8000 - Update CLAUDE.md documentation to reflect new port - Align with common development port standards All service endpoints now run on port 8000 instead of 8080.
1 parent 80746ed commit 10626c8

9 files changed

Lines changed: 18 additions & 18 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ CORS_ALLOW_CREDENTIALS=true
1616

1717
# Application Configuration
1818
APP_NAME=HaloLight
19-
PORT=8080
19+
PORT=8000
2020
SPRING_PROFILES_ACTIVE=dev
2121

2222
# Logging

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ HaloLight API Java 是基于 Spring Boot 3.4.1 + Java 23 构建的企业级后
2424

2525
```bash
2626
# 开发
27-
mvn spring-boot:run # 启动开发服务器(默认 http://localhost:8080
27+
mvn spring-boot:run # 启动开发服务器(默认 http://localhost:8000
2828
mvn spring-boot:run -Dspring-boot.run.profiles=prod # 生产配置启动
2929

3030
# 构建
@@ -130,7 +130,7 @@ src/main/java/com/halolight/
130130
| `JWT_REFRESH_EXPIRATION` | RefreshToken 过期时间(毫秒) | `604800000`(7天) |
131131
| `CORS_ALLOWED_ORIGINS` | CORS 允许源(逗号分隔) | `http://localhost:3000,http://localhost:5173` |
132132
| `SPRING_PROFILES_ACTIVE` | 激活的配置文件 | `dev` |
133-
| `PORT` | 服务端口 | `8080` |
133+
| `PORT` | 服务端口 | `8000` |
134134

135135
支持 `.env` 文件配置(通过 spring-dotenv)。
136136

@@ -201,8 +201,8 @@ public void clearCache() { ... }
201201
配置前端 API 地址:
202202
```env
203203
# Next.js
204-
NEXT_PUBLIC_API_URL=http://localhost:8080/api
204+
NEXT_PUBLIC_API_URL=http://localhost:8000/api
205205
206206
# Vue/Vite
207-
VITE_API_URL=http://localhost:8080/api
207+
VITE_API_URL=http://localhost:8000/api
208208
```

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ COPY --from=build /app/target/*.jar app.jar
2323

2424
# Health check
2525
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
26-
CMD curl -f http://localhost:8080/actuator/health || exit 1
26+
CMD curl -f http://localhost:8000/actuator/health || exit 1
2727

2828
# Expose port
29-
EXPOSE 8080
29+
EXPOSE 8000
3030

3131
# Run application
3232
ENTRYPOINT ["java", "-jar", "app.jar"]

FLY_DEPLOYMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fly logs
195195

196196
# 检查健康端点
197197
fly ssh console
198-
wget -O- http://localhost:8080/actuator/health
198+
wget -O- http://localhost:8000/actuator/health
199199
```
200200

201201
### 内存不足(OOMKilled)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ JWT_SECRET=your-super-secret-jwt-key-change-in-production-min-32-chars
8383
SPRING_PROFILES_ACTIVE=dev
8484
EOF
8585

86-
mvn spring-boot:run # 本地开发,默认 http://localhost:8080
86+
mvn spring-boot:run # 本地开发,默认 http://localhost:8000
8787
```
8888

8989
生产构建与启动
@@ -98,7 +98,7 @@ java -jar target/halolight-api-java-1.0.0.jar
9898
| 变量名 | 说明 | 默认值 |
9999
|--------|------|--------|
100100
| `SPRING_PROFILES_ACTIVE` | 运行环境 | `dev` |
101-
| `PORT` | 服务端口 | `8080` |
101+
| `PORT` | 服务端口 | `8000` |
102102
| `DATABASE_URL` | PostgreSQL 数据库连接 | `jdbc:postgresql://localhost:5432/halolight` |
103103
| `DATABASE_USERNAME` | 数据库用户名 | `postgres` |
104104
| `DATABASE_PASSWORD` | 数据库密码 | `postgres` |
@@ -112,7 +112,7 @@ java -jar target/halolight-api-java-1.0.0.jar
112112
```bash
113113
# .env 示例
114114
SPRING_PROFILES_ACTIVE=prod
115-
PORT=8080
115+
PORT=8000
116116
DATABASE_URL=jdbc:postgresql://your-host:5432/halolight_db?sslmode=require
117117
DATABASE_USERNAME=your_username
118118
DATABASE_PASSWORD=your_password
@@ -203,7 +203,7 @@ docker-compose down
203203

204204
```bash
205205
docker build -t halolight-api-java .
206-
docker run -p 8080:8080 --env-file .env halolight-api-java
206+
docker run -p 8000:8000 --env-file .env halolight-api-java
207207
```
208208

209209
### 自托管部署

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ services:
2525
postgres:
2626
condition: service_healthy
2727
environment:
28-
PORT: 8080
28+
PORT: 8000
2929
DATABASE_URL: jdbc:postgresql://postgres:5432/halolight
3030
DATABASE_USERNAME: postgres
3131
DATABASE_PASSWORD: postgres
3232
JWT_SECRET: halolight-secret-key-change-in-production-minimum-256-bits
3333
SPRING_PROFILES_ACTIVE: dev
3434
ports:
35-
- "8080:8080"
35+
- "8000:8000"
3636
restart: unless-stopped
3737

3838
volumes:

fly.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ primary_region = 'hkg'
1010
dockerfile = "Dockerfile"
1111

1212
[env]
13-
PORT = "8080"
13+
PORT = "8000"
1414

1515
[http_service]
16-
internal_port = 8080
16+
internal_port = 8000
1717
force_https = true
1818
auto_stop_machines = 'suspend'
1919
auto_start_machines = true

src/main/java/com/halolight/config/OpenApiConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626
),
2727
servers = {
28-
@Server(url = "http://localhost:8080", description = "Local Development Server"),
28+
@Server(url = "http://localhost:8000", description = "Local Development Server"),
2929
@Server(url = "https://api.halolight.com", description = "Production Server")
3030
}
3131
)

src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ spring:
3333
default-property-inclusion: non_null
3434

3535
server:
36-
port: ${PORT:8080}
36+
port: ${PORT:8000}
3737
error:
3838
include-message: always
3939
include-stacktrace: on_param

0 commit comments

Comments
 (0)