mirror of
https://github.com/owncast/owncast.git
synced 2024-11-21 12:18:02 +03:00
This commit is contained in:
parent
2409cab5b6
commit
36be7b76c2
5 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 6.4 KiB |
Loading…
Reference in a new issue