Docker-Davinci-Resolve-Proj.../README.md

158 lines
8.2 KiB
Markdown
Raw Normal View History

2021-11-27 22:14:45 +00:00
# Davinci Resolve Project Server
2022-07-30 18:50:08 +00:00
![Lint](https://github.com/elliotmatson/Docker-Davinci-Resolve-Project-Server/actions/workflows/lint.yml/badge.svg)
![Healthcheck](https://github.com/elliotmatson/Docker-Davinci-Resolve-Project-Server/actions/workflows/stack-healthcheck.yml/badge.svg)
![Docker Build](https://github.com/elliotmatson/Docker-Davinci-Resolve-Project-Server/actions/workflows/docker.yml/badge.svg)
2022-07-30 18:48:11 +00:00
2021-11-27 22:53:48 +00:00
Simple Resolve project server with automatic backups
2021-11-27 22:14:45 +00:00
## Table of Contents
- [Davinci Resolve Project Server](#davinci-resolve-project-server)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Features](#features)
2021-11-28 16:14:59 +00:00
- [Configuration](#configuration)
2022-07-29 21:23:29 +00:00
- [Database](#database)
- [Backups](#backups)
- [PGAdmin](#pgadmin)
- [Volume Locations](#volume-locations)
2021-11-27 22:14:45 +00:00
- [Installation](#installation)
2021-11-28 16:14:59 +00:00
- [QNAP Installation](#qnap-installation)
2021-11-27 23:50:13 +00:00
- [Synology](#synology)
- [Linux](#linux)
2021-11-28 17:33:36 +00:00
- [Different PostgreSQL versions](#different-postgresql-versions)
2022-07-29 21:23:29 +00:00
- [Setting up a PostgreSQL 9.5 or 11 Project Server](#setting-up-a-postgresql-95-or-11-project-server)
2021-11-28 16:14:59 +00:00
- [Thanks](#thanks)
2021-11-27 22:14:45 +00:00
## Introduction
2021-11-28 19:06:34 +00:00
There are a lot of ways to host a Resolve project server, but each of them has their own set of issues. The official project server requires manual backups, and other options can be complicated for those that don't have access to an IT team. Hopefully this is a more reliable and simpler solution for smaller teams!
2021-11-27 22:14:45 +00:00
### Features
2022-07-29 14:21:43 +00:00
- **Lightweight** - Docker based, so doesn't require a full macOS or Windows machine or VM.
2021-11-28 16:14:59 +00:00
- **Platform Independent** - can be installed on Windows, Mac, Linux, QNAP, Synology, RPi, really anything that can run Docker.
2021-11-28 18:39:53 +00:00
- **Compatible with Resolve's existing backup/restore functions** - All backup files use the standard Resolve *.backup file syntax, and can be restored from the Resolve UI
2022-07-29 21:23:29 +00:00
- **Built-in PGAdmin Server** - PGAdmin is a tool for administering a PostgreSQL Server, and is helpful for diagnosing problems and migrating/updating entire servers
2021-11-27 23:50:13 +00:00
2021-11-28 16:14:59 +00:00
## Configuration
2022-07-29 21:23:29 +00:00
There are a few things we'll need to edit at the top of the docker-compose.yml file to configure our installation:
2021-11-29 00:21:06 +00:00
```yaml
2022-07-29 21:23:29 +00:00
---
version: '3.8'
x-common:
database: &db-environment
POSTGRES_DB: database
POSTGRES_USER: postgres
POSTGRES_PASSWORD: DaVinci
TZ: America/Chicago
POSTGRES_LOCATION: &db-location "???:/var/lib/postgresql/data"
backup: &backup-environment
SCHEDULE: "@daily"
BACKUP_KEEP_DAYS: 7
BACKUP_KEEP_WEEKS: 4
BACKUP_KEEP_MONTHS: 6
BACKUP_LOCATION: &bk-location "???:/backups"
admin: &admin-environment
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_PORT: &pgadmin-port "3001:80"
2021-11-28 18:07:42 +00:00
...
```
2022-07-29 21:23:29 +00:00
### Database
To configure the server itself, we'll want to configure the environment variables below:
2021-11-28 18:07:42 +00:00
| Environment Variable |Meaning|
|---|---|
2022-11-04 04:05:40 +00:00
| POSTGRES_DB | Na
me of your database. Name it whatever you like. |
2022-07-29 21:23:29 +00:00
| POSTGRES_USER | Username you will use to connect to your database. The Resolve default is "postgres" |
| POSTGRES_PASSWORD | Password you will use to connect to your database. The Resolve default is "DaVinci" |
| TZ | Your timezone, here is [a list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)|
2022-07-29 21:25:58 +00:00
| POSTGRES_LOCATION | Location your database will be stored. See [Volume Locations](#volume-locations) |
2021-11-28 18:07:42 +00:00
2022-07-29 21:23:29 +00:00
### Backups
2021-11-28 18:58:07 +00:00
To configure the backups, we'll want to configure the variables below:
2022-07-29 21:23:29 +00:00
| Environment Variable |Meaning|
|---|---|
| SCHEDULE | This is a [cron string](https://www.freeformatter.com/cron-expression-generator-quartz.html) for how often backups are created. can be "@daily", "@every 1h", etc |
| BACKUP_KEEP_DAYS | Number of daily backups to keep before removal. |
| BACKUP_KEEP_WEEKS | Number of weekly backups to keep before removal. |
| BACKUP_KEEP_MONTHS | Number of daily backups to keep before removal. |
2022-07-29 21:25:58 +00:00
| BACKUP_LOCATION | Location your backups will be stored. See [Volume Locations](#volume-locations) |
2022-07-29 21:23:29 +00:00
### PGAdmin
To configure PGAdmin, we'll want to configure the variables below:
| Environment Variable |Meaning|
|---|---|
| PGADMIN_DEFAULT_EMAIL | Email used for PGAdmin login. Default is "admin@admin.com" |
| PGADMIN_DEFAULT_PASSWORD | Password used for PGAdmin login. Default is "root" |
| PGADMIN_PORT | String configuring port to expose PGAdmin on. Syntax is "YOUR_PORT:80" |
### Volume Locations
The location of your database and backups depend on what platform you are installing on. You will need the full path to the folder you want them stored in. On a QNAP NAS for example, if I wanted to use a folder called "Backups" inside a shared folder named "Videos" for my backups location, the path would be ```/shares/Videos/Backups/```, and my ```BACKUP_LOCATION``` value would look like this:
2021-11-29 00:21:06 +00:00
```yaml
2022-07-29 21:23:29 +00:00
BACKUP_LOCATION: &bk-location "/shares/Videos/Backups/:/backups"
2021-11-28 18:58:07 +00:00
```
2022-07-29 21:23:29 +00:00
On Ubuntu, if I wanted to use a folder named "database" in the home directory of the user named "johndoe" for my database location, the path would be ```/home/johndoe/database/```, and my ```POSTGRES_LOCATION``` value would look like this:
2021-11-28 18:58:07 +00:00
```yaml
2022-07-29 21:23:29 +00:00
POSTGRES_LOCATION: &db-location "johndoe/database/:/var/lib/postgresql/data"
2021-11-28 18:58:07 +00:00
```
2022-07-29 21:23:29 +00:00
I recommend putting your database on an SSD, your access speed will be noticeably slower on a spinning drive.
2021-11-27 22:14:45 +00:00
2021-11-28 18:34:21 +00:00
Once you have configured these settings, save your modified docker-compose.yml file and move on to installation!
2021-11-28 17:04:06 +00:00
2021-11-27 22:14:45 +00:00
## Installation
2021-11-28 16:14:59 +00:00
### QNAP Installation
2021-12-15 18:30:28 +00:00
Installing on a QNAP NAS is relatively simple. One note, please put the database files on an SSD. You will thank me later
2021-11-28 16:14:59 +00:00
1. If you don't already have it, install Container Station from the QNAP app store.
2. In Container Station, click "Create", then click "Create Application"
3. Name your application whatever you like (eg. ResolveServer)
4. Copy/Paste your modified docker-compose.yml file, hit "Validate YAML" to test it, and if it passes, click "Create"
2021-11-28 17:33:36 +00:00
5. Container Station will download the files it needs and start the app. Once it's done, you should be able to connect Resolve to the IP address of your QNAP using the database name and credentials
2022-07-29 14:21:43 +00:00
2021-11-27 23:50:13 +00:00
### Synology
2022-07-29 14:17:54 +00:00
See [#5](https://github.com/elliotmatson/Docker-Davinci-Resolve-Project-Server/issues/5)
2021-11-27 22:14:45 +00:00
2021-11-27 23:50:13 +00:00
### Linux
2021-11-28 17:33:36 +00:00
1. Follow the [Docker installation instructions for your Linux distribution](https://docs.docker.com/engine/install/)
2. Install [Docker Compose](https://docs.docker.com/compose/install/)
2022-07-29 14:21:43 +00:00
3. Move your modified docker-compose.yml file to a folder on your Linux machine, then navigate to that folder in the terminal.
4. Run:
2021-11-28 17:33:36 +00:00
```docker-compose up -d```
5. Docker-compose will download the files it needs and start the app. Once it's done, you should be able to connect Resolve to the IP address of your QNAP using the database name and credentials
2021-11-27 22:14:45 +00:00
2021-11-28 17:33:36 +00:00
## Different PostgreSQL versions
2022-07-29 19:05:02 +00:00
Generally, Resolve is not very tolerant of mismatched PostgreSQL versions. Resolve 18 uses PostgreSQL 13, which is what this repository now defaults to. Resolve 17 and below use PostgreSQL 9.5. Unfortunately the major release 9.5 is EOL, and 9.5.4 in particular has a lot of vulnerabilities that make it insecure.
2022-07-29 14:21:43 +00:00
Since most people are still using the default Resolve credentials for their server, security generally isn't the biggest concern, but if you are trying to secure your project server with an older version of Resolve, you will want to move to a supported version of PostgreSQL.
2021-11-27 22:14:45 +00:00
2022-07-29 14:21:43 +00:00
Resolve 17 and below still use a legacy feature that has been removed in PostgreSQL 12, so the latest major version that is useable is 11, which will be maintained until November 9, 2023.
2021-11-27 22:14:45 +00:00
### Setting up a PostgreSQL 9.5 or 11 Project Server
To setup a PostgreSQL 9.5 or 11 server instead of 13, there are 2 lines that need to be changed in docker_compose.yml:
2021-11-28 14:17:29 +00:00
```yaml
2021-11-28 14:16:04 +00:00
services:
postgres:
image: postgres:13
2021-11-28 14:16:04 +00:00
...
pgbackups:
image: prodrigestivill/postgres-backup-local:13
2021-11-28 14:16:04 +00:00
...
...
```
to the following:
2021-11-28 14:17:29 +00:00
```yaml
2021-11-28 14:16:04 +00:00
services:
postgres:
image: postgres:9.5
2021-11-28 14:16:04 +00:00
...
pgbackups:
image: prodrigestivill/postgres-backup-local:9.5
2021-11-28 14:16:04 +00:00
...
...
```
2021-11-28 16:14:59 +00:00
## Thanks
2021-11-29 00:41:02 +00:00
-[prodrigestivill](https://github.com/prodrigestivill/) for his [PostgreSQL Backup docker image](https://github.com/prodrigestivill/docker-postgres-backup-local)