修改docker文件挂载及配置文件读取
This commit is contained in:
parent
cf0f656032
commit
97704ca8d2
|
|
@ -0,0 +1,12 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: vp-image:latest
|
||||||
|
container_name: vp-container
|
||||||
|
ports:
|
||||||
|
- "8088:8083"
|
||||||
|
volumes:
|
||||||
|
- logs:/var/log/vp.log
|
||||||
|
- /etc/vp-app:/etc/vp-app
|
||||||
|
- /data/file:/data/file
|
||||||
3
main.go
3
main.go
|
|
@ -62,7 +62,8 @@ func init() {
|
||||||
os.MkdirAll(proto.CID_BASE_DIR+"workspace", os.ModePerm)
|
os.MkdirAll(proto.CID_BASE_DIR+"workspace", os.ModePerm)
|
||||||
//读取配置文件
|
//读取配置文件
|
||||||
//文件地址/home/videoplayer/vp.conf
|
//文件地址/home/videoplayer/vp.conf
|
||||||
configPath := "/home/videoplayer/vp.conf"
|
//configPath := "/home/videoplayer/vp.conf"
|
||||||
|
configPath := "/etc/vp-app/vp.conf"
|
||||||
//读取配置文件
|
//读取配置文件
|
||||||
err := proto.ReadConfig(configPath)
|
err := proto.ReadConfig(configPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue