mirror of https://gitee.com/answerdev/answer.git
fix uploads dir
This commit is contained in:
parent
a254f432ff
commit
407e29f63d
|
@ -9,7 +9,7 @@
|
|||
/.fleet
|
||||
/.vscode/*.log
|
||||
/cmd/answer/*.sh
|
||||
/cmd/answer/upfiles/*
|
||||
/cmd/answer/uploads/*
|
||||
/cmd/logs
|
||||
/configs/config-dev.yaml
|
||||
/go.work*
|
||||
|
|
|
@ -29,7 +29,7 @@ RUN apk --no-cache add build-base git \
|
|||
&& make clean build \
|
||||
&& cp answer /usr/bin/answer
|
||||
|
||||
RUN mkdir -p /data/upfiles && chmod 777 /data/upfiles \
|
||||
RUN mkdir -p /data/uploads && chmod 777 /data/uploads \
|
||||
&& mkdir -p /data/i18n && cp -r i18n/*.yaml /data/i18n
|
||||
|
||||
# stage3 copy the binary and resource files into fresh container
|
||||
|
|
|
@ -91,7 +91,7 @@ swaggerui:
|
|||
service_config:
|
||||
secret_key: "answer" #encryption key
|
||||
web_host: "http://127.0.0.1" #Page access using domain name address
|
||||
upload_path: "./upfiles" #upload directory
|
||||
upload_path: "./uploads" #upload directory
|
||||
```
|
||||
|
||||
## Compile the image
|
||||
|
@ -100,4 +100,4 @@ If you have modified the source files and want to repackage the image, you can u
|
|||
docker build -t answer:v1.0.0 .
|
||||
```
|
||||
## common problem
|
||||
1. The project cannot be started: the main program startup depends on proper configuraiton of the configuration file, `config.yaml`, as well as the internationalization translation directory (`i18n`), and the upload file storage directory (`upfiles`). Ensure that the configuration file is loaded when the project starts, such as when using `answer run -c config.yaml` and that the `config.yaml` correctly specifies the i18n and upfiles directories.
|
||||
1. The project cannot be started: the main program startup depends on proper configuraiton of the configuration file, `config.yaml`, as well as the internationalization translation directory (`i18n`), and the upload file storage directory (`uploads`). Ensure that the configuration file is loaded when the project starts, such as when using `answer run -c config.yaml` and that the `config.yaml` correctly specifies the i18n and uploads directories.
|
||||
|
|
|
@ -94,7 +94,7 @@ swaggerui:
|
|||
service_config:
|
||||
secret_key: "answer" #加密key
|
||||
web_host: "http://127.0.0.1" #页面访问使用域名地址
|
||||
upload_path: "./upfiles" #上传目录
|
||||
upload_path: "./uploads" #上传目录
|
||||
```
|
||||
|
||||
## 编译镜像
|
||||
|
@ -103,4 +103,4 @@ service_config:
|
|||
docker build -t answer:v1.0.0 .
|
||||
```
|
||||
## 常见问题
|
||||
1. 项目无法启动,answer 主程序启动依赖配置文件 config.yaml 、国际化翻译目录 /i18n 、上传文件存放目录 /upfiles,需要确保项目启动时加载了配置文件 answer run -c config.yaml 以及在 config.yaml 正确的指定 i18n 和 upfiles 目录的配置项
|
||||
1. 项目无法启动,answer 主程序启动依赖配置文件 config.yaml 、国际化翻译目录 /i18n 、上传文件存放目录 /uploads answer run -c config.yaml 以及在 config.yaml 正确的指定 i18n 和 uploads 目录的配置项
|
||||
|
|
|
@ -17,4 +17,4 @@ swaggerui:
|
|||
service_config:
|
||||
secret_key: "answer"
|
||||
web_host: "http://127.0.0.1:9080"
|
||||
upload_path: "/data/upfiles"
|
||||
upload_path: "/data/uploads"
|
||||
|
|
|
@ -17,7 +17,7 @@ const (
|
|||
|
||||
var (
|
||||
ConfigFilePath = "/conf/"
|
||||
UploadFilePath = "/upfiles/"
|
||||
UploadFilePath = "/uploads/"
|
||||
I18nPath = "/i18n/"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue