Giter Club home page Giter Club logo

Comments (4)

elmagnificogi avatar elmagnificogi commented on June 19, 2024 2

我试了一下 加个volume就行了

version: '3'
services:
  webapp:
    build: .
    restart: always
    ports:
      - "9514:9514"
    environment:
      - sapic_redis_url=redis://@redis:6379
      # 设置信任代理标头
      #- sapic_proxyfix=true
    volumes:
      - static:/picbed/static/
      - /data/picbed/:/picbed/static/upload/
    depends_on:
      - "redis"
  redis:
    image: "redis:alpine"
    command: ["redis-server", "--appendonly", "yes"]
    volumes:
      - /data/picbed/redis/data/:/data/
volumes:
  static:

已经有数据的,最好先进到容器里,先把appendonly.aof复制出来
docker cp '容器的id':/data/appendonly.aof /data/picbed/redis/data/appendonly.aof

然后修改docker-compose,重启啥的就没关系了。

我就不PR了,有空你也改下吧

from sapic.

staugur avatar staugur commented on June 19, 2024

所有数据存储在redis中,所以redis必须开启持久化:AOF、RDB等,docker-compose.yml内部启动了redis,开启了AOF,但是生成的文件还在容器内,没有挂载到宿主机上,刚才试了下,down和build应该都会删除容器,之前down测试过,但忘记试过删除重启保持状态。

需要更新下文档,着重标明下用默认的docker-compose.yml仅适用于体验测试。

from sapic.

elmagnificogi avatar elmagnificogi commented on June 19, 2024

那能改一下把文件也同时挂载出来吧?这样方便一些

from sapic.

staugur avatar staugur commented on June 19, 2024

考虑增加2个yml,带redis和不带的

from sapic.

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.