javahuang / SurveyKing

Make a better survey system.
https://surveyking.cn
MIT License
3.34k stars 506 forks source link

这个 docker 版本丢数据啊,正确的使用方式是什么? #62

Closed I-Want-ToBelieve closed 4 months ago

I-Want-ToBelieve commented 4 months ago

一键启动

docker run -d -p 1991:1991 surveyking/surveyking

挂载文件目录和日志文件

docker run -d -p 1991:1991 -v /my/logs:/files -v /my/logs:/logs

这两种你们用的时候不会丢数据吗?

I-Want-ToBelieve commented 4 months ago

我知道了

 docker ps -a
CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS                            PORTS                                       NAMES
ae4947ac5e31   surveyking/surveyking   "sh -c 'java ${JAVA_…"   4 minutes ago    Exited (143) About a minute ago                                               eager_goldwasser
07aad5f89a53   surveyking/surveyking   "sh -c 'java ${JAVA_…"   4 minutes ago    Created                                                                       awesome_shannon
be8a760e6120   surveyking/surveyking   "sh -c 'java ${JAVA_…"   24 minutes ago   Exited (143) 4 minutes ago                                                    cool_davinci
d0fa4c3bd3ec   surveyking/surveyking   "sh -c 'java ${JAVA_…"   24 hours ago     Created                                                                       agitated_roentgen
3927519c82bb   surveyking/surveyking   "sh -c 'java ${JAVA_…"   24 hours ago     Up About a minute                 0.0.0.0:1991->1991/tcp, :::1991->1991/tcp   friendly_gauss

首次启动

docker run -d -p 1991:1991 -v /my/logs:/files -v /my/logs:/logs surveyking/surveyking

再次启动必须 docker ps -a 找到这个 id 比如 ae4947ac5e31a 然后 docker start ae4947ac5e31a