Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaoai-video
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚珂
yaoai-video
Commits
cf0b0a24
Commit
cf0b0a24
authored
Apr 21, 2026
by
yaoke.yk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: improve deployment docs and docker build
parent
9bda1904
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
50 deletions
+61
-50
README.md
README.md
+52
-36
Dockerfile
doc/html/Dockerfile
+2
-2
docker-compose.yml
docker-compose.yml
+2
-6
Dockerfile
yaoai-comic-studio/Dockerfile
+5
-6
No files found.
README.md
View file @
cf0b0a24
# YaoAI Video
# YaoAI Video
当前仓库已经整理为一个单仓库项目,核心只保留两部分:
Single-repo workspace for an AI comic / short-drama production platform.
-
前端工程:
`doc/html`
This repository now keeps only the two main applications:
-
后端工程:
`yaoai-comic-studio`
## 开发态启动
-
Frontend:
`doc/html`
-
Backend:
`yaoai-comic-studio`
这部分保持你现在本地已经跑通的方式,不改习惯。
## Repository Layout
1.
启动后端依赖服务:
```
text
.
|-- doc/html # Vite frontend
|-- yaoai-comic-studio # Spring Boot multi-module backend
|-- docker-compose.yml # production-style deployment
`-- .env.example # deployment environment template
```
## Local Development
Backend dependencies:
```
bash
```
bash
cd
yaoai-comic-studio
cd
yaoai-comic-studio
docker compose up
-d
docker compose up
-d
```
```
2.
编译后端:
Backend build:
```
bash
```
bash
cd
yaoai-comic-studio
cd
yaoai-comic-studio
mvn package
-pl
yaoai-bootstrap
-am
-DskipTests
mvn package
-pl
yaoai-bootstrap
-am
-DskipTests
```
```
3.
启动后端 Jar:
Backend run:
```
bash
```
bash
cd
yaoai-comic-studio
cd
yaoai-comic-studio
java
-jar
yaoai-bootstrap
\t
arget
\y
aoai-bootstrap-0.1.0-SNAPSHOT.jar
java
-jar
yaoai-bootstrap
\t
arget
\y
aoai-bootstrap-0.1.0-SNAPSHOT.jar
```
```
4.
启动前端开发服务:
Frontend run:
```
bash
```
bash
cd
doc/html
cd
doc/html
...
@@ -38,52 +48,58 @@ npm install
...
@@ -38,52 +48,58 @@ npm install
npm run dev
npm run dev
```
```
默认开发访问地址:
Default development URLs:
-
前端:
`http://localhost:5173`
-
Frontend:
`http://localhost:5173`
-
后端:
`http://localhost:8080`
-
Backend:
`http://localhost:8080`
-
Swagger
:
`http://localhost:8080/swagger-ui/index.html`
-
Swagger
:
`http://localhost:8080/swagger-ui/index.html`
##
发布态部署
##
Production-Style Deployment
根目录的
`docker-compose.yml`
是单独给部署使用的,会一起构建前端和后端镜像。
The root
`docker-compose.yml`
is intended for one-command deployment.
It builds both the frontend and backend images and starts MySQL + Redis.
1.
复制环境变量模板:
1.
Create an environment file:
```
bash
```
bash
cp
.env.example .env
cp
.env.example .env
```
```
2.
补全
`.env`
中的数据库密码、火山引擎 Ark/TOS 等配置。
2.
Fill in the required secrets in
`.env`
, especially:
-
`VOLCENGINE_ARK_API_KEY`
-
`VOLCENGINE_TOS_ACCESS_KEY`
-
`VOLCENGINE_TOS_SECRET_KEY`
-
`VOLCENGINE_TOS_BUCKET`
3.
在仓库根目录执行:
3.
Start the deployment stack:
```
bash
```
bash
docker compose up
-d
--build
docker compose up
-d
--build
```
```
默认发布访问地址:
If the local development dependency stack is already running, stop it first or
change the ports in
`.env`
before starting the root deployment stack.
-
前端:
`http://localhost:3000`
Default deployment URLs:
-
后端:
`http://localhost:8080`
发布态下,前端容器会通过 Nginx 将
`/api`
反向代理到后端容器,不需要额外处理跨域。
-
Frontend:
`http://localhost:3000`
-
Backend:
`http://localhost:8080`
## 文件说明
The frontend container proxies
`/api`
to the backend container through Nginx,
so deployment does not require separate CORS handling.
-
根目录
`docker-compose.yml`
:发布态一键部署
## Important Files
-
`yaoai-comic-studio/docker-compose.yml`
:开发态依赖服务
-
`.env.example`
:发布态环境变量模板
## 推送到 GitHub
-
`docker-compose.yml`
: deployment stack
-
`yaoai-comic-studio/docker-compose.yml`
: local backend dependency stack
-
`.env.example`
: deployment environment template
-
`doc/html/Dockerfile`
: frontend image build
-
`doc/html/nginx.conf`
: frontend reverse proxy config
-
`yaoai-comic-studio/Dockerfile`
: backend image build
如果你要新建 GitHub 仓库并推送当前代码,可以直接在根目录执行:
## GitHub
```
bash
Repository URL:
git add
.
git commit
-m
"chore: keep frontend and backend only"
`https://github.com/yaoke602/yaoai-video`
git branch
-M
main
git remote remove origin
git remote add origin <your-github-repo-url>
git push
-u
origin main
```
doc/html/Dockerfile
View file @
cf0b0a24
FROM
node:20-alpine AS builder
FROM
docker.m.daocloud.io/library/
node:20-alpine AS builder
WORKDIR
/app
WORKDIR
/app
...
@@ -12,7 +12,7 @@ ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
...
@@ -12,7 +12,7 @@ ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
RUN
npm run build
RUN
npm run build
FROM
nginx:1.27-alpine
FROM
docker.m.daocloud.io/library/
nginx:1.27-alpine
COPY
nginx.conf /etc/nginx/conf.d/default.conf
COPY
nginx.conf /etc/nginx/conf.d/default.conf
COPY
--from=builder /app/dist /usr/share/nginx/html
COPY
--from=builder /app/dist /usr/share/nginx/html
...
...
docker-compose.yml
View file @
cf0b0a24
services
:
services
:
mysql
:
mysql
:
image
:
mysql:8.0
image
:
docker.m.daocloud.io/library/mysql:8.0
container_name
:
yaoai-mysql
environment
:
environment
:
MYSQL_ROOT_PASSWORD
:
${MYSQL_ROOT_PASSWORD:-root123}
MYSQL_ROOT_PASSWORD
:
${MYSQL_ROOT_PASSWORD:-root123}
MYSQL_DATABASE
:
${MYSQL_DATABASE:-yaoai_comic}
MYSQL_DATABASE
:
${MYSQL_DATABASE:-yaoai_comic}
...
@@ -25,8 +24,7 @@ services:
...
@@ -25,8 +24,7 @@ services:
restart
:
unless-stopped
restart
:
unless-stopped
redis
:
redis
:
image
:
redis:7.2-alpine
image
:
docker.m.daocloud.io/library/redis:7.2-alpine
container_name
:
yaoai-redis
ports
:
ports
:
-
"
${REDIS_PORT:-16379}:6379"
-
"
${REDIS_PORT:-16379}:6379"
volumes
:
volumes
:
...
@@ -42,7 +40,6 @@ services:
...
@@ -42,7 +40,6 @@ services:
build
:
build
:
context
:
./yaoai-comic-studio
context
:
./yaoai-comic-studio
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
container_name
:
yaoai-backend
environment
:
environment
:
TZ
:
${TZ:-Asia/Shanghai}
TZ
:
${TZ:-Asia/Shanghai}
SPRING_PROFILES_ACTIVE
:
${SPRING_PROFILES_ACTIVE:-prod}
SPRING_PROFILES_ACTIVE
:
${SPRING_PROFILES_ACTIVE:-prod}
...
@@ -77,7 +74,6 @@ services:
...
@@ -77,7 +74,6 @@ services:
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
args
:
args
:
VITE_API_BASE_URL
:
${VITE_API_BASE_URL:-/api}
VITE_API_BASE_URL
:
${VITE_API_BASE_URL:-/api}
container_name
:
yaoai-frontend
depends_on
:
depends_on
:
-
backend
-
backend
ports
:
ports
:
...
...
yaoai-comic-studio/Dockerfile
View file @
cf0b0a24
# ===== Stage 1: Build =====
# ===== Stage 1: Build =====
FROM
eclipse-temurin:17-jdk-jammy
AS builder
FROM
docker.m.daocloud.io/library/maven:3.9.9-eclipse-temurin-17
AS builder
WORKDIR
/workspace
WORKDIR
/workspace
# Cache Maven dependencies
# Cache Maven dependencies
COPY
.mvn/ .mvn/
COPY
pom.xml ./
COPY
mvnw pom.xml ./
COPY
yaoai-common/pom.xml yaoai-common/
COPY
yaoai-common/pom.xml yaoai-common/
COPY
yaoai-domain/pom.xml yaoai-domain/
COPY
yaoai-domain/pom.xml yaoai-domain/
COPY
yaoai-security/pom.xml yaoai-security/
COPY
yaoai-security/pom.xml yaoai-security/
...
@@ -23,14 +22,14 @@ COPY yaoai-worker/pom.xml yaoai-worker/
...
@@ -23,14 +22,14 @@ COPY yaoai-worker/pom.xml yaoai-worker/
COPY
yaoai-bootstrap/pom.xml yaoai-bootstrap/
COPY
yaoai-bootstrap/pom.xml yaoai-bootstrap/
COPY
yaoai-test/pom.xml yaoai-test/
COPY
yaoai-test/pom.xml yaoai-test/
RUN
./mvnw
dependency:go-offline
-B
-q
RUN
mvn
dependency:go-offline
-B
-q
# Build
# Build
COPY
. .
COPY
. .
RUN
./mvnw
package
-pl
yaoai-bootstrap
-am
-DskipTests
-B
-q
RUN
mvn
package
-pl
yaoai-bootstrap
-am
-DskipTests
-B
-q
# ===== Stage 2: Runtime =====
# ===== Stage 2: Runtime =====
FROM
eclipse-temurin:17-jre-jammy
FROM
docker.m.daocloud.io/library/
eclipse-temurin:17-jre-jammy
LABEL
maintainer="YaoAI Team <yaoke251@gmail.com>"
LABEL
maintainer="YaoAI Team <yaoke251@gmail.com>"
LABEL
org.opencontainers.image.title="YaoAI Comic Studio"
LABEL
org.opencontainers.image.title="YaoAI Comic Studio"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment