How Can We Help?

Categories

How to run with Docker

You are here:

Run with Docker

docker run --name pvault -e PLATFORM=CLOUD -e DB_HOST=... --network pv2-network -d globaldyne/perfumersvault

The following environment variables are also honored for configuring your PV instance:

Please note, all DB_ variables are required.

- `-e PLATFORM=CLOUD`
- `-e DB_HOST=...`
- `-e DB_NAME=...`
- `-e DB_USER=...`
- `-e DB_PASS=...`
- `-e MAX_FILE_SIZE=4194304`
- `-e TMP_PATH=/tmp/`
- `-e FILE_EXT='pdf, doc, docx, xls, csv, xlsx, png, jpg, jpeg, gif'`
- `-e DB_BACKUP_PARAMETERS='--column-statistics=1'` <- Set this to 0 if backup fails

The DB_NAME needs to already exist on the given MySQL server; it will not be created by the PV container.

If you’d like to be able to access the instance from the host without the container’s IP, standard port mappings can be used:
docker run --name pvault -e PLATFORM=CLOUD -e DB_HOST=... -p 8000:8000 -d globaldyne/perfumersvault
Then, access it via http://localhost:8000 or http://host-ip:8000 in a browser.

docker-compose

Example compose.yaml for PV:

---
version: '3.8'
services:
  pvdb:
    image: mariadb:10.5
    command: '--default-authentication-plugin=mysql_native_password --innodb-flush-method=fsync'
    volumes:
     - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: pvault
      MYSQL_DATABASE: pvault
      MYSQL_USER: pvault
      MYSQL_PASSWORD: pvault
    expose:
      - 3306
  pvault:
    image: globaldyne/perfumersvault:latest
    ports:
      - 8000:8000
    restart: always
    environment:
      PLATFORM: CLOUD
      DB_HOST: pvdb
      DB_USER: pvault
      DB_PASS: pvault
      DB_NAME: pvault
      MAX_FILE_SIZE: 4194304
      TMP_PATH: /tmp/
      FILE_EXT: 'pdf, doc, docx, xls, csv, xlsx, png, jpg, jpeg, gif'
      DB_BACKUP_PARAMETERS: '--column-statistics=1'
volumes:
  db_data:

Run docker stack deploy -c compose.yaml pvault (or docker compose up -d), wait for it to initialize completely, and visit http://swarm-ip:8000, http://localhost:8000, or http://host-ip:8000 (as appropriate).

Build your own image

If you wish to build your own Docker image, you can find the Dockerfile in the project’s root directory.

To build execute

docker build -t pvault .

 

Table of Contents