Skip to content

Docker

The repository ships a multi-stage Dockerfile (Node 18 Alpine) and a docker-compose.yml for the app. The app needs a MongoDB: the steps below add one next to it.

  1. Clone the repository

    Terminal window
    git clone https://github.com/RemiDufeu/imprime.io.git
    cd imprime.io
  2. Create the .env file

    Docker Compose reads .env automatically. Start from the example and fill in at least the three variables below:

    Terminal window
    cp .env.example .env
    .env
    MONGODB_URI=mongodb://mongodb:27017/imprime
    PUBLIC_APP_URL=http://localhost:3023
    BETTER_AUTH_SECRET=<output of: openssl rand -base64 32>
    CORS_ORIGIN=http://localhost:3023

    All options are described in Configuration.

  3. Add MongoDB

    Create a docker-compose.override.yml next to docker-compose.yml — Compose merges both files automatically:

    docker-compose.override.yml
    services:
    app:
    depends_on:
    - mongodb
    mongodb:
    image: mongo:7
    container_name: imprime-mongodb
    restart: unless-stopped
    volumes:
    - mongo-data:/data/db
    volumes:
    mongo-data:
  4. Build and start

    Terminal window
    docker compose up -d --build

    The first build takes a few minutes (it builds the four packages).

  5. Open Imprime

    Go to http://localhost:3023, click Sign up and create the first account. Check the instance is healthy:

    Terminal window
    curl http://localhost:3023/api/health
    # {"status":"ok","timestamp":"2026-10-22T14:00:00.000Z"}
  • Directoryimprime.io/
    • .env your configuration (never commit it)
    • docker-compose.yml
    • docker-compose.override.yml MongoDB
    • Dockerfile
    • Directorypackages/
      • …
Task Command
Follow logs docker compose logs -f app
Stop docker compose down
Update git pull && docker compose up -d --build
Back up data docker compose exec mongodb mongodump --archive > imprime-$(date +%F).archive
Restore data docker compose exec -T mongodb mongorestore --archive < imprime-2026-10-22.archive
Terminal window
docker build -t imprime .
docker run -d --name imprime -p 3023:3023 \
-e NODE_ENV=production -e PORT=3023 \
-e MONGODB_URI="mongodb://my-mongo-host:27017/imprime" \
-e PUBLIC_APP_URL="https://imprime.example.com" \
-e CORS_ORIGIN="https://imprime.example.com" \
-e BETTER_AUTH_SECRET="$(openssl rand -base64 32)" \
imprime