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

164 lines
7.6 KiB
Markdown
Raw Normal View History

2021-11-27 22:14:45 +00:00
# Davinci Resolve Project Server
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)
2021-11-28 18:07:42 +00:00
- [PostgreSQL Server](#postgresql-server)
- [Backup Server](#backup-server)
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)
2021-11-28 14:16:04 +00:00
- [Setting up a PostgreSQL 11 Project Server](#setting-up-a-postgresql-11-project-server)
2021-11-27 23:50:13 +00:00
- [Using PostgreSQL 11 on Windows](#using-postgresql-11-on-windows)
2021-11-28 18:34:21 +00:00
- [Using PostgreSQL 11 on Mac](#using-postgresql-11-on-mac)
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
2021-11-27 23:50:13 +00:00
2021-11-28 16:14:59 +00:00
## Configuration
2021-11-28 18:07:42 +00:00
There are a few things we'll need to edit in the docker-compose.yml file to configure our installation:
### PostgreSQL Server
2021-11-28 18:39:53 +00:00
To configure the server itself, we'll want to configure the environment variables below:
2021-11-29 00:21:06 +00:00
```yaml
2021-11-28 18:07:42 +00:00
...
services:
postgres:
...
environment:
- POSTGRES_DB=database
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=DaVinci
- TZ=America/Chicago
...
...
```
| Environment Variable |Meaning|
|---|---|
| POSTGRES_DB | This is the name of your database. Name it whatever you like. |
| POSTGRES_USER | This is the username you will use to connect to your database. The Resolve default is "postgres" |
| POSTGRES_PASSWORD | This is the password you will use to connect to your database. The Resolve default is "DaVinci" |
| TZ | This is your timezone, here is [a list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)|
### Backup Server
2021-11-28 18:58:07 +00:00
To configure the backups, we'll want to configure the variables below:
2021-11-29 00:21:06 +00:00
```yaml
2021-11-28 18:07:42 +00:00
...
services:
...
pgbackups:
...
2021-11-28 18:58:07 +00:00
volumes:
- "(Whatever location you want backups stored):/backups"
...
2021-11-28 18:07:42 +00:00
environment:
- POSTGRES_HOST=postgres
- POSTGRES_DB=database
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=DaVinci
- POSTGRES_EXTRA_OPTS=--blobs --format=custom --quote-all-identifiers
- BACKUP_SUFFIX=.backup
- SCHEDULE=@daily
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
- HEALTHCHECK_PORT=8080
- TZ=America/Chicago
...
...
```
2021-11-28 18:59:26 +00:00
First, we will want to decide on a backup location and edit the ```volumes:``` section. You will need the full path to the folder you want backups stored in. On a QNAP NAS for example, if I wanted to use a folder called "Backups" inside a shared folder named "Videos", the path would be ```/shares/Videos/Backups/```, and my ```volumes:``` section would look like this:
2021-11-28 18:58:07 +00:00
```yaml
volumes:
- "/shares/Videos/Backups:/backups"
```
On Ubuntu, if I wanted to use a folder named "Backups" in the home directory of the user named "johndoe", the path would be ```/home/johndoe/Backups/```, and my ```volumes:``` section would look like this:
```yaml
volumes:
- "/home/johndoe/Backups:/backups"
```
There are also some variables in the environment section. Many of these don't need to be edited, but here are the ones you might want to change:
2021-11-28 18:07:42 +00:00
| Environment Variable |Meaning|
|---|---|
2021-11-28 18:34:21 +00:00
| POSTGRES_DB | This is the name of the database from the previous step. Can also be a comma/space separated list of database names if you create more in the future |
2021-11-28 18:07:42 +00:00
| POSTGRES_USER | This is the database username from the previous step |
| POSTGRES_PASSWORD | This is the database password from the previous step |
| 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.
| TZ | This is your timezone, here is [a list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)|
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 14:21:43 +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.
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)