From 228264ebb5cbf255051e682ba6226e12df0fccab Mon Sep 17 00:00:00 2001 From: Aaron Greenspan Date: Tue, 24 Dec 2019 15:09:07 -0700 Subject: [PATCH] updates to registry resource path --- src/Constants.hs | 2 +- src/Lib/Registry.hs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Constants.hs b/src/Constants.hs index 51ffd0b..9ae381c 100644 --- a/src/Constants.hs +++ b/src/Constants.hs @@ -12,7 +12,7 @@ configPath :: FilePath configPath = "./config" resourcesPath :: FilePath -resourcesPath = "./resources" +resourcesPath = "/var/www/html/resources" registryVersion :: AppVersion registryVersion = fromJust . parseMaybe parseJSON . String . toS . showVersion $ version diff --git a/src/Lib/Registry.hs b/src/Lib/Registry.hs index dd0b851..381091c 100644 --- a/src/Lib/Registry.hs +++ b/src/Lib/Registry.hs @@ -11,6 +11,7 @@ import Yesod.Core import Data.Text (isSuffixOf) +import Constants import Lib.Semver import Lib.Types.Semver import Util.Function @@ -31,10 +32,10 @@ instance PathPiece S9PK where toPathPiece = show appResourceDir :: FilePath -appResourceDir = "./resources/apps" +appResourceDir = resourcesPath "apps" sysResourceDir :: FilePath -sysResourceDir = "./resources/sys" +sysResourceDir = resourcesPath "sys" appManifestPath :: FilePath appManifestPath = appResourceDir "apps.yaml"