dev-lu / osint_toolkit

A full stack web application that combines many tools and services for security analysts into a single tool.
MIT License
517 stars 85 forks source link

Data persistence in docker #21

Closed ne0x86 closed 1 year ago

ne0x86 commented 1 year ago

Hi there!

Im running osint toolkit in docker over docker-compose.yml and I can see no volumes are mapped for saving configuration/data.

So, now I want to update for new changes and enhancements, but I dont know if all my configuration and all my API keys will be lost.

Is this considered? Thank you for your great tool

dev-lu commented 1 year ago

Hi, all data is stored an an sqlite database. You can store the database on your local filesystem if you update your docker compose file like this:

version: "3.8"
services:
  backend:
    build: ./backend
    container_name: backend
    ports:
      - "8000:8000"
    volumes:
      - ./sql_app.db:/database/sql_app.db
  frontend:
    build:
      context: ./frontend
      #args:
      #  - BACKEND_URL=http://<IP_ADDRESS>:<PORT>  # Backend URL without trailing slash
    container_name: frontend
    ports:
      - "3000:3000"
    stdin_open: true
    tty: true

I just pushed an update where the database is now stored under /database/data in the container and has been renamed to otk_data.db. You'll need to rename your local database file to otk_data.db and update the path of the mapping in the new version of the Docker Compose file when using the latest version. Thank you for your kind words!