使用docker compose搭建limesurvey

首先准备docker和docker-compose 

新增docker-compose.yml

version: '2'

services:
  mysql:
    image: mysql:8
    volumes:
      - mysql:/var/lib/mysql
    restart: always
    environment:
        MYSQL_ROOT_PASSWORD: example
    ports:
      - "3306:3306"

  limesurvey:
    links:
      - mysql

    environment:
      LIMESURVEY_DB_PASSWORD: example
      LIMESURVEY_ADMIN_USER: admin
      LIMESURVEY_ADMIN_PASSWORD: password
      LIMESURVEY_ADMIN_NAME: Lime Administrator
      LIMESURVEY_ADMIN_EMAIL: lime@lime.lime

    ports:
      - "8082:80"
    volumes:
      - upload:/app/upload
    image:
      acspri/limesurvey:latest

volumes:
  mysql:
  upload:

使用docker-compose up 构建服务。

在浏览器输入http://192.168.237.130:8082/index.php/admin 进行查看登录 。 

账号密码如下:

      LIMESURVEY_ADMIN_USER: admin
      LIMESURVEY_ADMIN_PASSWORD: password

或者不使用docker-compose 使用现有已经的数据库
docker run --name limesurvey -p 8082:80 -e LIMESURVEY_DB_HOST=192.168.100.45:3306 -e LIMESURVEY_DB_USER=dev_user -e LIMESURVEY_DB_PASSWORD=8imJI3GNR0ifn5Vb  -d acspri/limesurvey

-e 参数详情见https://registry.hub.docker.com/r/acspri/limesurvey

 
posted @ 2021-06-23 10:39  雨V幕  阅读(728)  评论(0编辑  收藏  举报