YuukiPS / DockerGS

DockerGC is a container that run Grasscutter (anime game) with just a single command.
GNU Affero General Public License v3.0
553 stars 107 forks source link

docker-compose运行报错 #5

Closed Joyace closed 2 years ago

Joyace commented 2 years ago

docker-compose logs -f

gc       | remove file no need
gc       | WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: No such file or directory
gc       | WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: No such file or directory
gc       | (1/7) Purging git (2.34.2-r0)
gc       | (2/7) Purging wget (1.21.2-r2)
gc       | (3/7) Purging libcurl (7.80.0-r0)
gc       | (4/7) Purging expat (2.4.7-r0)
gc       | (5/7) Purging pcre2 (10.39-r0)
gc       | (6/7) Purging libidn2 (2.3.2-r0)
gc       | (7/7) Purging libunistring (0.9.10-r1)
gc       | Executing busybox-1.34.1-r3.trigger
gc       | OK: 89 MiB in 29 packages
gc       | install    proto      resources
gc       | create table id and config.json
gc       | Error: Unable to access jarfile grasscutter.jar
gc       | sh: yes: unknown operand
gc       | Set: Server Datebase MongoDB: mongodb://mongodb:27017
gc       | json: error: ENOENT: no such file or directory, open 'config.json'
gc       | sed: config.json: No such file or directory
gc       | json: error: ENOENT: no such file or directory, open 'config.json'
gc       | json: error: ENOENT: no such file or directory, open 'config.json'
gc       | json: error: ENOENT: no such file or directory, open 'config.json'
gc       | json: error: ENOENT: no such file or directory, open 'config.json'
gc       | json: error: ENOENT: no such file or directory, open 'config.json'
gc       | Error: Unable to access jarfile grasscutter.jar

docker-compose.yml

version: '3.8'
services:
  mongo:
    image: mongo:4.4.4 #根据需要选择自己的镜像
    container_name: mongo
    restart: unless-stopped
    ports:
     - 27017:27017
    volumes:
     - ./container/mongo/db:/data/db # 挂载数据目录
     - ./container/mongo/log:/var/log/mongodb  # 挂载日志目录
     - ./container/mongo/config:/etc/mongo  # 挂载配置目录
    # command: --config /docker/mongodb/mongod.conf # 配置文件

  gc:
    image: siakbary/dockergc:dev-2.7
    container_name: gc
    restart: unless-stopped
    command: -d 'mongodb://mongodb:27017' -b 'localhost' -f 'yes'
    volumes:
      - ./container/gc/resources:/home/Grasscutter/resources
    ports:
      - "22102:22102/udp"
      - "443:443/tcp"
      - "80:80/tcp"
    depends_on:
      - mongo
    stdin_open: true
    tty: true
Joyace commented 2 years ago

解决了 mongodb://mongodb:27017 写错了