diff --git a/Dockerfile b/Dockerfile index 8e9ac45..493549d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,11 +20,6 @@ COPY ./src/package*.json ./ # Copy source COPY ./src ./ -# Copy default memory -RUN if [ ! -s /app/memory.db ]; then \ - cp /app/memory.default.db /app/memory.db; \ - fi - # Create replied_ids.json RUN touch replied_ids.json diff --git a/entrypoint.sh b/entrypoint.sh index d0598de..e3c1cfe 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,6 +14,12 @@ RUN npm ci --unsafe-perm # Change line break find /app -type f -exec sed -i 's/\r$//' {} \; +# Copy default memory +if [ ! -s /app/memory.db ]; then \ + cp /app/memory.default.db /app/memory.db; \ + rm -f /app/memory.default.db; \ + fi + # Create config.json cat < /app/config.json {