Giter Site home page Giter Site logo

ask's Introduction

JoiAsk 提问箱

main page

样例可见 轴伊Joi的提问箱

Build 构建

docker build -t joiask .

Run 运行

docker run -it -d --restart always \
    -p 8080:8080 \
    -v /path/to/config.json:/work/config/config.json \
    -v /path/to/storage/:/work/frontend/public/upload-img/ \
    --name jask \
    ghcr.io/xinrea/joiask:latest

后台地址为: https://your.domain/admin

默认管理员账号/密码为:admin/admin

记得第一时间登录后台修改管理员密码。

Configuration 配置

OSS 存储图片

{
    "db_type": "mysql",
    "mysql": {
        "host": "192.168.50.58",
        "port": 3306,
        "user": "root",
        "pass": "test",
        "name": "jask"
    },
    "server": {
        "host": "0.0.0.0",
        "port": 8080
    },
    "storage_type": "oss",
    "oss":{
        "address": "https://i0.vjoi.cn",
        "endpoint":"oss-cn-beijing.aliyuncs.com",
        "access_key":"",
        "secret_key":"",
        "bucket":"jwebsite-storage"
    }
}

本地存储图片

本地存储时,上传的图片将会被存储在容器的 /work/frontend/public/upload-img/ 目录。记得要将存储目录挂在到容器的该位置下。

{
    "db_type": "mysql",
    "mysql": {
        "host": "192.168.50.58",
        "port": 3306,
        "user": "root",
        "pass": "test",
        "name": "jask"
    },
    "server": {
        "host": "0.0.0.0",
        "port": 8080
    },
    "storage_type": "local"
}

使用 SQlite 数据库

同样记得将数据库文件挂载到配置文件所指定的位置,否则删除容器会导致数据丢失。

{
    "db_type": "sqlite",
    "sqlite": "/work/db/jask.db",
    "server": {
    ...
}

ask's People

Contributors

xinrea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.