2.6 KiB
Docker help for qrm2
You have multiple ways to use docker to run an instance of qrm2.
Using docker-compose and the prebuilt-image (recommended)
This is the easiest method for running the bot without any modifications.
Do not clone the repository when using this method!
-
Create a new directory and
cdinto it. -
Create the
docker-compose.ymlfile:version: '3' services: qrm2: image: "ghcr.io/miaowware/qrm2:latest" restart: on-failure volumes: - "./data:/app/data:rw" -
Create a subdirectory named
data. -
Copy the templates for
options.pyandkeys.pytodata/, and edit them. -
Run
docker-compose:$ docker-compose pull $ docker-compose up -dRun without "-d" to test the bot (run in foreground).
Using docker-compose and building the image
This is the easiest method to run the bot with modifications.
-
cdinto the repository. -
Create the
docker-compose.ymlfile:version: '3' services: qrm2: build: . image: "qrm2:local-latest" restart: on-failure volumes: - "./data:/app/data:rw" -
Create a subdirectory named
data. -
Copy the templates for
options.pyandkeys.pytodata/, and edit them. -
Run
docker-compose:$ docker-compose build --pull $ docker-compose up -dRun without "-d" to test the bot (run in foreground).
Using pure docker
This methods is not very nice to use.
I just wanna run the darn thing, not do gymnastics!
[Optional] Building the image
-
cdinto the repository. -
Run docker build:
$ docker build -t qrm2:local-latest .
Creating the container
-
Be in a directory with a
data/subdirectory, which should contain validoptions.pyandkeys.pyfiles (copy and edit the templates). -
Run the container:
$ docker run -d --rm --mount type=bind,src=$(pwd)/data,dst=/app/data --name qrm2 [image]Where
[image]is either of:qrm2:local-latestif you are building your own.ghcr.io/miaowware/qrm2:latestif you want to use the prebuilt image.