Portabase Logo
Portabase AgentDatabases

SQLite

Configuration for SQLite.

Add this database from the dashboard

Since Dashboard 1.29.0 and Agent 1.19.0, you can add this database directly from the dashboard (Add database on the agent page). See Adding a Database. The settings described below also apply to the dashboard form, and the SQLite file must still be mounted in the agent container.

Configuration

When running portabase agent db add, select sqlite as the database type.

Docker Compose Example

Example with a SQLite image.

docker-compose.yml
services:

    sqlite:
      container_name: db-sqlite
      image: keinos/sqlite3
      volumes:
        - sqlite-data:/workspace/data
      working_dir: /workspace
      command: tail -f /dev/null
      stdin_open: true
      tty: true

    agent:
        image: portabase/agent:latest
        volumes:
          - ./databases.json:/config/config.json
        # Map data sqlite folder in order to access it then in agent container
          - sqlite-data:/sqlite-data/workspace/data
        # ... agent configuration ...
        networks:
          - portabase

networks:
  portabase:
    external: true

volumes:
  sqlite-data:

If you use a local SQLite database, you only have to map it in agent volumes /var/lib/myapp:/sqlite-data/workspace/data

Last updated on

On this page