add docker file

main
ZGGSONG 2 years ago
parent 276a6092ce
commit 08a4f941ea

@ -0,0 +1,14 @@
FROM alpine:latest
RUN mkdir "/app"
WORKDIR "/app"
RUN mkdir "/app/config"
RUN mkdir "/app/log"
RUN mkdir "/app/upload"
COPY receive-files "/app/receive-files"
EXPOSE 7201
ENTRYPOINT ["./receive-files"]

@ -1,5 +1,5 @@
## client
```shell
curl -X POST -F 'file=@test.xls' 127.0.0.1:8080/upload
curl -X POST -F 'file=@xcm.jpeg' -F 'name=xcm.jpeg' 127.0.0.1:7201/upload
```

@ -15,7 +15,7 @@ func init() {
// 初始化日志
logger := &lumberjack.Logger{
//Filename: "./Log/Receive_File_Log" + time.Now().Format("20060102_150405") + ".txt",
Filename: "./Log/Receive_File_Log.txt",
Filename: "./log/Receive_File_Log.txt",
MaxSize: 10, // 日志文件大小,单位是 MB
MaxBackups: 3, // 最大过期日志保留个数
MaxAge: 28, // 保留过期文件最大时间,单位 天

Loading…
Cancel
Save