Docker Deployment (PostgreSQL)
This guide uses the same published production image as the SQLite guide, but pairs the app with PostgreSQL through Compose.
Why Compose is recommended
Section titled “Why Compose is recommended”The PostgreSQL deployment needs an app container, a database container, persistent volumes, and environment wiring. docker compose keeps those pieces together in one file.
Required environment variables
Section titled “Required environment variables”The app still needs these variables:
IMG_AUTH_TOKENIMG_JWT_SECRETIMG_DATABASE_URL
The PostgreSQL container also needs its own settings, such as:
POSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORD
In the provided example, the app uses:
postgres://ibed:ibed-password@postgres:5432/ibedCompose file
Section titled “Compose file”Download the compose file first. It pulls the published app image, starts PostgreSQL, and mounts persistent volumes for database and application data.
curl -L https://docsib.rotcool.me/docker-compose.pgsql.yml -o docker-compose.pgsql.ymlBefore starting it, copy your config file to ./deploy/config.toml in the repository root:
mkdir -p deploycp config.toml deploy/config.tomlStart the stack
Section titled “Start the stack”Optionally pull the latest published image first:
docker compose -f docker-compose.pgsql.yml pullThen start the stack:
docker compose -f docker-compose.pgsql.yml up -dReadiness and permissions caveats
Section titled “Readiness and permissions caveats”- The app depends on PostgreSQL being reachable before startup completes
- The compose example includes a PostgreSQL healthcheck and waits for the database container to report healthy
- On startup, RS-IBED may connect to the maintenance database first and attempt to create the target database automatically
- That means the configured PostgreSQL user needs permission to connect to
postgresand create the target database, unless the target database already exists or you deliberately usepostgresas the target database name
Inspect the stack
Section titled “Inspect the stack”Check service status:
docker compose -f docker-compose.pgsql.yml psFollow app logs:
docker compose -f docker-compose.pgsql.yml logs -f appFollow PostgreSQL logs:
docker compose -f docker-compose.pgsql.yml logs -f postgresVerify the deployment
Section titled “Verify the deployment”Open http://localhost:3000/, upload a sample image, then restart the stack and confirm that both metadata and files persist.