Install with Docker
Build a Docker image of OpenReports from its repository and run it with a volume for your data.
On this page
The repository has a Dockerfile. Build your own image from it, and keep the data folder of the container in a volume so your views and reports survive when the container is replaced.
Build the image
git clone https://github.com/totaljs/openreports.git
cd openreports
docker build -t openreports .Run the container
docker run -d --name openreports -p 8000:8000 -v openreports-data:/www/.src/databases openreportsOpen http://localhost:8000/ and continue with First access.
The volume openreports-data holds the file memorize_data.json with your settings, views and reports. You can stop, remove and create the container again with the same command, and your work stays.
Run it with Docker Compose
Save this as compose.yaml in the openreports folder:
services:
web:
build: .
ports:
- "8000:8000"
volumes:
- data:/www/.src/databases
volumes:
data:Then start it:
docker compose up -d --buildConnect to PostgreSQL from the container
Inside the container, localhost is the container itself. In the connection string, use an address of the PostgreSQL server that the container can reach, for example the name of a PostgreSQL container on the same Docker network. See Connect the database.