@ -25,5 +25,4 @@ COPY --from=build /build/owncast /app/owncast
COPY --from=build /build/webroot /app/webroot
COPY --from=build /build/static /app/static
COPY --from=build /build/data /app/data
COPY --from=build /build/webroot/img/logo.svg app/data/logo.svg
CMD ["/app/owncast"]
@ -69,7 +69,6 @@ build() {
cp "${TMPDIR}tailwind.min.css" ./dist/${NAME}/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css
cp -R static/ dist/${NAME}/static
cp README.md dist/${NAME}
cp webroot/img/logo.svg dist/${NAME}/data/logo.svg
pushd dist/${NAME} >> /dev/null
@ -17,6 +17,8 @@ const (
FfmpegSuggestedVersion = "v4.1.5" // Requires the v
// BackupDirectory is the directory we write backup files to.
BackupDirectory = "backup"
// DataDirectory is the directory we save data to.
DataDirectory = "data"
)
var (
@ -2,12 +2,14 @@ package data
import (
"errors"
"path/filepath"
"sort"
"strings"
"time"
"github.com/owncast/owncast/config"
"github.com/owncast/owncast/models"
"github.com/owncast/owncast/utils"
log "github.com/sirupsen/logrus"
@ -469,6 +471,16 @@ func VerifySettings() error {
return errors.New("no stream key set. Please set one in your config file")
}
logoPath := GetLogoPath()
if !utils.DoesFileExists(filepath.Join(config.DataDirectory, logoPath)) {
defaultLogo := filepath.Join(config.WebRoot, "img/logo.svg")
log.Infoln(logoPath, "not found in the data directory. copying a default logo.")
if err := utils.Copy(defaultLogo, filepath.Join(config.DataDirectory, "logo.svg")); err != nil {
log.Errorln("error copying default logo: ", err)
SetLogoPath("logo.svg")
return nil
Before
Width: | Height: | Size: 6.4 KiB