This commit is contained in:
1 parent
e3a4ec81db
commit
cb4df782a7
7 files changed
+210
No files matched your search
@@ -0,0 +1,21 @@
|
|||||||
|
.git
|
||||||
|
.agents
|
||||||
|
.codex
|
||||||
|
node_modules
|
||||||
|
tests
|
||||||
|
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
!.env.docker.example
|
||||||
|
|
||||||
|
data/*
|
||||||
|
!data/.gitkeep
|
||||||
|
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
Dockerfile*
|
||||||
|
compose*.yml
|
||||||
|
compose*.yaml
|
||||||
|
README.md
|
||||||
|
LICENSE
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# 首次启动前请复制为 .env.docker,并替换下面两个值。
|
||||||
|
# TOTP_ENCRYPTION_KEY 必须至少 32 个字符,部署后不得随意更换。
|
||||||
|
TOTP_ENCRYPTION_KEY=replace-with-a-random-secret-of-at-least-32-characters
|
||||||
|
|
||||||
|
INITIAL_ADMIN_USERNAME=admin
|
||||||
|
INITIAL_ADMIN_PASSWORD=replace-with-a-strong-admin-password
|
||||||
|
INITIAL_ADMIN_DISPLAY_NAME=系统管理员
|
||||||
|
|
||||||
|
# 下列公开站点信息可按需修改。
|
||||||
|
PUBLIC_SITE_NAME=海州市教育考试中心
|
||||||
|
PUBLIC_SITE_CODE=HZ-EDU-032
|
||||||
|
PUBLIC_SITE_PHONE=0518-8602 3158
|
||||||
|
PUBLIC_SITE_ADDRESS=江苏省连云港市海州区文教路 18 号
|
||||||
|
PUBLIC_SITE_EMAIL=
|
||||||
|
PUBLIC_SITE_HERO_EYEBROW=HAIZHOU EXAMINATION SERVICE
|
||||||
|
PUBLIC_SITE_HERO_TITLE=一个报名号,
|
||||||
|
PUBLIC_SITE_HERO_HIGHLIGHT=贯穿每一次考试。
|
||||||
|
PUBLIC_SITE_HERO_DESCRIPTION=使用学校下发的报名号登录,完成密码更新和个人信息核验后,即可办理所有考试事项。
|
||||||
|
PUBLIC_SITE_FOOTER_NOTICE=本平台展示数据仅用于系统演示
|
||||||
|
|
||||||
|
# 可选 Redis 缓存;容器外的 Redis 不应填写 127.0.0.1。
|
||||||
|
# REDIS_URL=redis://redis-host:6379/0
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
name: Build and publish Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Test, build and publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: https://github.com/actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "22"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: https://github.com/docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: https://github.com/docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: https://github.com/docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.io
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Generate image tags and labels
|
||||||
|
id: metadata
|
||||||
|
uses: https://github.com/docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: docker.io/${{ vars.DOCKERHUB_IMAGE }}
|
||||||
|
flavor: latest=false
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/master' }}
|
||||||
|
type=sha,format=short,prefix=sha-
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
uses: https://github.com/docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
|
cache-from: type=registry,ref=docker.io/${{ vars.DOCKERHUB_IMAGE }}:buildcache
|
||||||
|
cache-to: type=registry,ref=docker.io/${{ vars.DOCKERHUB_IMAGE }}:buildcache,mode=max
|
||||||
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user