diff --git a/.gitignore b/.gitignore index 25bfe7d..7a7f664 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ rna/nupack-4.0.2.0.zip nupack/vendor/nupack-4.0.2.0/source/ nupack/vendor/nupack-4.0.2.0/package/*.whl !nupack/vendor/nupack-4.0.2.0/package/nupack-4.0.2.0-cp312-cp312-linux_x86_64.whl +# Runtime state mounted from Docker containers. +runtime/redis/ diff --git a/README.md b/README.md index 5e48d1a..4f61554 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ The service listens on port `18765`. You can later reverse proxy `np.lihato.icu` - `POST /api/jobs` - `GET /api/jobs/` + +## Persistent Shares + +Shared result links are stored in Redis when `NP_REDIS_URL` is enabled. The compose file maps Redis data to `./runtime/redis` and enables AOF/RDB persistence, so shares survive container recreation and service restarts. Back up or migrate `./runtime/redis` if you move the deployment. + ## Notes - `tube` mode supports strand concentrations and `SetSpec(max_size=...)`. diff --git a/docker-compose.yml b/docker-compose.yml index a27f57a..aef86f8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,12 @@ services: container_name: np-redis restart: always mem_limit: 2g - command: ["redis-server", "--save", "", "--appendonly", "no"] + command: ["redis-server", "--appendonly", "yes", "--appendfsync", "everysec", "--save", "60", "1"] + volumes: + - ./runtime/redis:/data np-replica: - image: np-app:v4.2 + image: np-app:v4.5 build: context: . dockerfile: Dockerfile @@ -17,7 +19,7 @@ services: depends_on: - redis ports: - - "18765:18765" + - "100.64.0.2:18765:18765" environment: NP_HOST: 0.0.0.0 NP_PORT: 18765 @@ -35,7 +37,7 @@ services: GOTO_NUM_THREADS: 4 np-worker: - image: np-app:v4.2 + image: np-app:v4.5 container_name: np-worker restart: always mem_limit: 56g