rename personal resume packages and add seed data
50
packages/reactive-resume-personal-direct/.env
Normal file
@@ -0,0 +1,50 @@
|
||||
TZ=Asia/Shanghai
|
||||
APP_URL=https://isiseg.huijutec.cn
|
||||
|
||||
# Local debug access only: http://127.0.0.1:3004
|
||||
LOCAL_BIND_IP=127.0.0.1
|
||||
LOCAL_APP_PORT=3004
|
||||
|
||||
POSTGRES_DB=reactive_resume
|
||||
POSTGRES_USER=reactive_resume
|
||||
POSTGRES_PASSWORD=2ed1869944c609f070699bdf8c92194f
|
||||
DATABASE_URL=postgresql://reactive_resume:2ed1869944c609f070699bdf8c92194f@postgres:5432/reactive_resume
|
||||
|
||||
AUTH_SECRET=9ef1720ee316f9316241bdc84f5dfad99b52f139b48880300942ee61d81b7cda
|
||||
ENCRYPTION_SECRET=20851888c2a96b11f1f6fc21b4eeb70f1e8258f2d0d414be8bace65eaff289ae
|
||||
|
||||
BETTER_AUTH_API_KEY=
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
GITHUB_CLIENT_ID=
|
||||
GITHUB_CLIENT_SECRET=
|
||||
LINKEDIN_CLIENT_ID=
|
||||
LINKEDIN_CLIENT_SECRET=
|
||||
OAUTH_PROVIDER_NAME=
|
||||
OAUTH_CLIENT_ID=
|
||||
OAUTH_CLIENT_SECRET=
|
||||
OAUTH_DISCOVERY_URL=
|
||||
OAUTH_AUTHORIZATION_URL=
|
||||
OAUTH_TOKEN_URL=
|
||||
OAUTH_USER_INFO_URL=
|
||||
OAUTH_DYNAMIC_CLIENT_REDIRECT_HOSTS=
|
||||
OAUTH_SCOPES=
|
||||
SMTP_HOST=
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=
|
||||
SMTP_PASS=
|
||||
SMTP_FROM=Reactive Resume <noreply@isiseg.huijutec.cn>
|
||||
SMTP_SECURE=false
|
||||
S3_ACCESS_KEY_ID=
|
||||
S3_SECRET_ACCESS_KEY=
|
||||
S3_REGION=us-east-1
|
||||
S3_ENDPOINT=
|
||||
S3_BUCKET=
|
||||
S3_FORCE_PATH_STYLE=false
|
||||
REDIS_URL=
|
||||
CLOUDFLARE_ACCOUNT_ID=
|
||||
CLOUDFLARE_API_TOKEN=
|
||||
FLAG_DISABLE_SIGNUPS=false
|
||||
FLAG_DISABLE_EMAIL_AUTH=false
|
||||
FLAG_DISABLE_IMAGE_PROCESSING=false
|
||||
FLAG_ALLOW_UNSAFE_AI_BASE_URL=false
|
||||
36
packages/reactive-resume-personal-direct/README.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Reactive Resume 个人简历直接运行安装包
|
||||
|
||||
这套包已经按 `https://isiseg.huijutec.cn` 和 FRP `remotePort = 10004` 预置,可以在当前服务器上直接运行。包内已包含当前简历初始化数据、头像和作品集图片,首次启动后可直接访问公开简历。
|
||||
|
||||
## 启动
|
||||
|
||||
```bash
|
||||
docker compose -f compose.yml up -d
|
||||
```
|
||||
|
||||
启动后:
|
||||
|
||||
- 本机调试地址:`http://127.0.0.1:3004`
|
||||
- 公网访问地址:`https://isiseg.huijutec.cn`
|
||||
- 当前公开简历:`https://isiseg.huijutec.cn/audience/resume`
|
||||
- FRP 映射:本地 `reactive-resume:3000` -> 公网服务器 `10004`
|
||||
|
||||
## 反向代理要求
|
||||
|
||||
公网服务器上的 Nginx Proxy Manager / 反向代理应配置:
|
||||
|
||||
- Domain Names:`isiseg.huijutec.cn`
|
||||
- Scheme:`http`
|
||||
- Forward Hostname / IP:`82.157.255.195`
|
||||
- Forward Port:`10004`
|
||||
- Websockets Support:开启
|
||||
- SSL:按现有 huijutec.cn 域名策略配置
|
||||
|
||||
## 数据
|
||||
|
||||
Compose 会创建独立项目名 `reactive-resume-personal`,默认使用 Docker named volumes:
|
||||
|
||||
- `reactive-resume-personal_postgres_data`
|
||||
- `reactive-resume-personal_reactive_resume_data`
|
||||
|
||||
`seed/` 目录会在首次启动时导入当前用户、公开简历和上传图片。后续如需迁移数据,请备份这些 volumes。
|
||||
94
packages/reactive-resume-personal-direct/compose.yml
Normal file
@@ -0,0 +1,94 @@
|
||||
name: reactive-resume-personal
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- resume_net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
reactive-resume:
|
||||
image: amruthpillai/reactive-resume:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- "${LOCAL_BIND_IP}:${LOCAL_APP_PORT}:3000"
|
||||
volumes:
|
||||
- reactive_resume_data:/app/data
|
||||
networks:
|
||||
- resume_net
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"node",
|
||||
"-e",
|
||||
"fetch('http://127.0.0.1:3000/api/health').then((r) => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1));",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
seed:
|
||||
image: postgres:16-alpine
|
||||
restart: "no"
|
||||
user: "0:0"
|
||||
entrypoint: ["/bin/sh"]
|
||||
command:
|
||||
- -c
|
||||
- |
|
||||
set -eu
|
||||
mkdir -p /app/data/uploads
|
||||
cp -a /seed/uploads/. /app/data/uploads/
|
||||
chown -R 1000:1000 /app/data/uploads || true
|
||||
psql -h postgres -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" -v ON_ERROR_STOP=1 -f /seed/seed.sql
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- reactive_resume_data:/app/data
|
||||
- ./seed:/seed:ro
|
||||
networks:
|
||||
- resume_net
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
reactive-resume:
|
||||
condition: service_healthy
|
||||
|
||||
frpc:
|
||||
image: fatedier/frpc:v0.68.0
|
||||
restart: unless-stopped
|
||||
command: ["-c", "/etc/frp/frpc.yaml"]
|
||||
volumes:
|
||||
- ./frpc.yaml:/etc/frp/frpc.yaml:ro
|
||||
networks:
|
||||
- resume_net
|
||||
depends_on:
|
||||
seed:
|
||||
condition: service_completed_successfully
|
||||
|
||||
networks:
|
||||
resume_net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
reactive_resume_data:
|
||||
17
packages/reactive-resume-personal-direct/frpc.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
serverAddr: "82.157.255.195"
|
||||
serverPort: 7000
|
||||
|
||||
auth:
|
||||
method: "token"
|
||||
token: "en.xjtu.edu.cn"
|
||||
|
||||
transport:
|
||||
poolCount: 5
|
||||
heartbeatTimeout: -1
|
||||
|
||||
proxies:
|
||||
- name: "reactive-resume-personal"
|
||||
type: "tcp"
|
||||
localIP: "reactive-resume"
|
||||
localPort: 3000
|
||||
remotePort: 10004
|
||||
1250
packages/reactive-resume-personal-direct/seed/resume-data.json
Normal file
1326
packages/reactive-resume-personal-direct/seed/seed.sql
Normal file
|
After Width: | Height: | Size: 6.4 MiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 329 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 191 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 812 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 558 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 754 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 97 KiB |