media-server

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

README

== media-server

https://ci.codeberg.org/Mediathek/media-server[image:https://ci.codeberg.org/api/badges/Mediathek/media-server/status.svg[pipeline status]] https://goreportcard.com/report/codeberg.org/Mediathek/media-server[image:https://goreportcard.com/badge/codeberg.org/Mediathek/media-server[Go Report Card]]

This should become the Server of the OpenSource Mediathek and Streaming-Server.

For the Frontend, take a look here: https://codeberg.org/Mediathek/media-ui[media-ui]

=== Compile

[source,sh]
----
go get -v -u codeberg.org/Mediathek/media-server
----

=== Configuration

Copy link:./config_example.toml[`config_example.toml`] to `config.toml` and take a look there.

=== Pre-requierements

* PostgreSQL - Database (or cockroachdb)

For Testing we use a database called `media_server` with user `root`, take a look in link:./.github/workflows/ci.yml#L26-L51[CI-Scripts]

=== Startup

Everything is controlled by the `config.toml`. A database migration happens on every startup if necessary.

==== For Developers

[source,sh]
----
go run ./main.go
----

==== In Production

Create https://www.freedesktop.org/software/systemd/man/systemd.service.html[systemd.service] file under: `/etc/systemd/system/media-server.service`

[source,ini]
----
[Unit]
Description = media-server

[Service]
Type=simple
User=mediaserver
ExecStart=/usr/local/bin/media-server -c /etc/media-server.conf
Restart=always
RestartSec=5s
Environment=PATH=/usr/bin:/usr/local/bin

[Install]
WantedBy=multi-user.target
----

Store in `media-server.service` given path: - config file - binary

Enable service on Startup of service and start now:

[source,sh]
----
systemctl enable --now media-server.service
----

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL