add network_mode: host to docker-compose config

This commit is contained in:
Jon Schoning 2020-07-22 11:17:03 -05:00
parent 9c05b86518
commit 6377d229d1
2 changed files with 8 additions and 4 deletions

View file

@ -9,6 +9,7 @@ services:
- "3000:3000"
volumes:
- '$APPDATA:/app/data'
network_mode: host
environment:
- IP_FROM_HEADER=true
- SQLITE_DATABASE=/app/data/espial.sqlite3

View file

@ -22,6 +22,7 @@ shouldArchiveBookmark :: User -> Key Bookmark -> Handler Bool
shouldArchiveBookmark user kbid = do
runDB (get kbid) >>= \case
Nothing -> pure False
Just bm -> do
pure $
(isNothing $ bookmarkArchiveHref bm) &&
@ -32,10 +33,12 @@ shouldArchiveBookmark user kbid = do
getArchiveManager :: Handler Manager
getArchiveManager = do
appSettings <- pure . appSettings =<< getYesod
NH.newTlsManagerWith $ NH.mkManagerSettings def $
NC.SockSettingsSimple
<$> fmap unpack (appArchiveSocksProxyHost appSettings)
<*> fmap toEnum (appArchiveSocksProxyPort appSettings)
let mSocks =
NC.SockSettingsSimple <$>
fmap unpack (appArchiveSocksProxyHost appSettings) <*>
fmap toEnum (appArchiveSocksProxyPort appSettings)
NH.newTlsManagerWith (NH.mkManagerSettings def mSocks)
archiveBookmarkUrl :: Key Bookmark -> String -> Handler ()
archiveBookmarkUrl kbid url =