Coder Social home page Coder Social logo

Feature request: Docker support about koishi HOT 7 CLOSED

koishijs avatar koishijs commented on May 11, 2024 2
Feature request: Docker support

from koishi.

Comments (7)

NN708 avatar NN708 commented on May 11, 2024

Docker support for Koishi is now available on Docker Hub: https://hub.docker.com/r/koishijs/koishi (version 1.12.0). docker-compose.yml can be used to deploy CoolQ, CQHTTP, MySQL and Koishi very quickly.

More Things To-Do

  • Write instructions for Docker on Koishi website
  • Port Docker support to Koishi v2
  • Install plug-ins automatically
  • Use environment variables to initialize (type, port, server, selfId, MySQL configuration)

Discussion

The starting script start.js is basically the same as koishi init, but use environment variables. Is it possible to add something like koishi init -d, letting it read environment variables to initialize configuration file?

from koishi.

shigma avatar shigma commented on May 11, 2024

Due to the sunset of CoolQ and CQHTTP, we are now pending Mrs4s/go-cqhttp#7.

from koishi.

purerosefallen avatar purerosefallen commented on May 11, 2024

I don't think building a Docker image for Koishi itself is a good idea. Docker images should be built by upstream developers.
Anyway, is this Docker image a base image for other Docker images of apps depend on Koishi be built? I think building an official image like this may also be a good idea. eg.

FROM koishi
WORKDIR /usr/src/app
COPY ./package*.json ./
RUN npm ci
COPY . ./
RUN npm run build
CMD npm start

Another choice is, to build an ONBUILD image for quick deployment.

from koishi.

NN708 avatar NN708 commented on May 11, 2024

@purerosefallen Thank you for your suggestions! However, this official Docker image is mainly for users who want to quickly deploy only Koishi and public plugins with one-click. For upstream developers, I think that building your own Docker image based on Node is simpler, and this official image for Koishi could be a reference for you.

from koishi.

purerosefallen avatar purerosefallen commented on May 11, 2024

Due to the down of CoolQ and CQHttp, the example docker-compose.yml file's CQHttp backend could be replaced by either of these below.
https://hub.docker.com/r/scjtqs/mirai-cqhttp
https://hub.docker.com/r/nanahira/go-cqhttp
The 1st one is a CQHttp run on Mirai, while the 2nd one is my own fork of go-cqhttp . You may consider either.

from koishi.

NN708 avatar NN708 commented on May 11, 2024

@purerosefallen Thank you for your Docker image! I have updated docker-compose.yml in branch docker.

from koishi.

NN708 avatar NN708 commented on May 11, 2024

Using Docker page has been released on Koishi website. Closing this issue now.

from koishi.

Related Issues (20)

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.