Hubro / clipface

Self-hosted web application for sharing video clips
MIT License
118 stars 13 forks source link

Latest Docker Container Fails to Start #29

Closed endergrimm closed 3 years ago

endergrimm commented 3 years ago

I was running this before, but when I pulled the latest version I no longer can get the docker container to start. Below is what is being logged to the console.

$ next start -p 39456

ready - started server on 0.0.0.0:39456, url: http://localhost:39456

Error: Configuration property "header_title" is not defined

at Config.get (/app/node_modules/config/lib/config.js:182:11)

at Object.<anonymous> (/app/next.config.js:6:29)

at Module._compile (node:internal/modules/cjs/loader:1101:14)

at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

at Module.load (node:internal/modules/cjs/loader:981:32)

at Function.Module._load (node:internal/modules/cjs/loader:822:12)

at Module.require (node:internal/modules/cjs/loader:1005:19)

at require (node:internal/modules/cjs/helpers:94:18)

at Object.loadConfig [as default] (/app/node_modules/next/dist/server/config.js:345:34)

at async NextServer.loadConfig (/app/node_modules/next/dist/server/next.js:112:22)

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Hubro commented 3 years ago

@endergrimm The default configuration has been updated. Since the config directory (/config) is a Docker volume, it is not deleted when you recreate the container, and the default configuration in that volume is therefore outdated. If you delete the volume before you run the Clipface container, it should work as expected. Make sure to back up any config changes you have made first.

If you didn't mount a directory to /config manually, Docker will have created an anonymous volume for you. You can find it with:

$ docker inspect clipface | jq '.[0].Mounts[] | select(.Destination == "/config")'

(This requires jq, which I highly recommend having installed anyway)

This will output something like:

{
  "Type": "volume",
  "Name": "af9f6a669a42f6bbb0e7b4e5332cefe4ee01f9bab958fea41b56afa0b4be4ecb",
  "Source": "/var/lib/docker/volumes/af9f6a669a42f6bbb0e7b4e5332cefe4ee01f9bab958fea41b56afa0b4be4ecb/_data",
  "Destination": "/config",
  "Driver": "local",
  "Mode": "",
  "RW": true,
  "Propagation": ""
}

To delete it, run:

$ docker volume rm af9f6a669a42f6bbb0e7b4e5332cefe4ee01f9bab958fea41b56afa0b4be4ecb

In hindsight, making the config directory a volume by default was probably a bad idea, and I will change that. Alternatively, I could perhaps move the default config to a different directory, if that's possible. I will look into it.

endergrimm commented 3 years ago

Yep, that fixes it. Thanks for your great work! I have this setup with synctoy and shadowplay's automatic highlights to upload clips to a google drive mount. Works out pretty slick to just have my highlights show up on my site.