mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.7k stars 498 forks source link

Docker compose installation tutorial for Synology NAS #283

Closed mgogoulos closed 1 year ago

mgogoulos commented 3 years ago

Discussed in https://github.com/mediacms-io/mediacms/discussions/282

Originally posted by **EricGuic** August 24, 2021 Hi (from a french follower), I'm not a developper, and as a growing number of people, I start to take back control over my data using simple services that I host on my Synology NAS using Docker. Folowing tutorials (likes the one provided by [Marius Hosting](https://mariushosting.com/), or [Rusty](https://www.blackvoid.club/) or many other...) I've successfully installed Portainer to manage simple services like Snapdrop, Tiny RSS, AdGuardHome... So now, I want to host my own video platform (I'm a director, and don't want to use Youtube or Vimeo, and want to try MediaCMS to host my files, and generate multiples resolution and the embed code needed to add those videos to my blogs under Ghost and Wordpress). But in your documentation or in the medium post you write, I see installation process that are too complicated for the kind of user I represent. Is there a way to write a guide, that will describe : - how to fully install MediaCMS using the stack feature inside Portainer (the compose file is written directly inside the Portainer web UI, and is relatively simple to update the image later or to edit the configuration variable inside this compose syntax without the need to type ssh command) - how to map the directory so the media files can be store outside the container, on a volume on the NAS (this is for example what I do for my Plex Media Server : the app is inside a container in /docker/pms/ and the media are inside multiple folders inside media/movie or media/music and so on. Thanks per advance if you can provide this sort of help. Best regards from France. Eric
mgogoulos commented 3 years ago

Hi @EricGuic , I have converted this to an issue. Added the help wanted label and hope some contributor can handle this!

Best Markos

scyto commented 2 years ago

@ericguic

This is not going to be simple to get working on synology due to the design decision to use a gitclone of mediacms outside of the container (when what should have been done was to have it inside the containers with just the config files and media outside.

I just wrote a breadcrumb trail for a friend trying to get all of this working.

assumes you have docker and docker-compose installed

  1. on the host OS navigate to the parent location you want the mediacms app and content to live
  2. git clone the project then cd mediacms
  3. edit docker-compose.yaml to look like this https://pastebin.com/aTmaBarU change the port as needed and the password to something else
  4. setup a NGIX proxy like NPM to point cms.mydomain.com to dockerhost (aka the port you set in 3 above) make sure you create a http NPM host using a cert
  5. in the mediacms dir edit ./deploy/docker/local_settings.py and change the FRONTEND_HOST = 'http://localhost' to reflect whatever https://cms.mydomain.com/ you created in step 4
  6. docker-compose up

in theory you could use this taml content inside portainers UI, you would need to amend the volume paths to be absolute not relative,

things i found:

  1. the docker-compose.yaml is syntactically wrong for the version it has, it will fail (conditions are no longer allowed) - the pastebin link abve is a known good yaml
  2. for some reason even though the web1 nginx service seems to be only listening on 80 it keeps trying to set the protocol to SSL - rather than dig into the why i mitigated by fronting with my nginx reverse proxy

Good luck, this is not a simple or canonical docker implementation. I can't provide more help as beyond doing a poc to help out a friend i have no use for this CMS)