Compare commits

...

2 Commits

Author SHA1 Message Date
2c369943e7 Migrations configuration 2019-01-21 22:35:05 +02:00
86085e146c Less logging 2019-01-21 21:51:17 +02:00
5 changed files with 21 additions and 3 deletions

View File

@ -8,5 +8,5 @@ before_script:
- mkdir -p ~/.config/nixpkgs - mkdir -p ~/.config/nixpkgs
script: script:
- nix-build ./release.nix --option trusted-public-keys "masser-ebook-manager.cachix.org-1:mtFSkQ2MO5MvjUpulZoFKjKUIa8g8CTcdPVuJaPKS1w= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option binary-caches "https://masser-ebook-manager.cachix.org https://cache.nixos.org" -A ghc.backend -A ghc.frontend - nix build -f ./release.nix --option trusted-public-keys "masser-ebook-manager.cachix.org-1:mtFSkQ2MO5MvjUpulZoFKjKUIa8g8CTcdPVuJaPKS1w= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option binary-caches "https://masser-ebook-manager.cachix.org https://cache.nixos.org" ghc.backend ghc.frontend
- nix-build ./release.nix --option trusted-public-keys "masser-ebook-manager.cachix.org-1:mtFSkQ2MO5MvjUpulZoFKjKUIa8g8CTcdPVuJaPKS1w= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option binary-caches "https://masser-ebook-manager.cachix.org https://cache.nixos.org" -A ghcjs.frontend - nix build -f ./release.nix --option trusted-public-keys "masser-ebook-manager.cachix.org-1:mtFSkQ2MO5MvjUpulZoFKjKUIa8g8CTcdPVuJaPKS1w= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option binary-caches "https://masser-ebook-manager.cachix.org https://cache.nixos.org" ghcjs.frontend

View File

@ -9,7 +9,8 @@ import Dhall (Interpret)
data Pg = Pg { username :: Text data Pg = Pg { username :: Text
, password :: Text , password :: Text
, host :: Text , host :: Text
, database :: Text } , database :: Text
, migrations :: Text }
deriving (Show, Generic) deriving (Show, Generic)
data Store = Filestore { path :: Text } data Store = Filestore { path :: Text }

View File

@ -0,0 +1,7 @@
{ database : { username : Text
, password : Text
, host : Text
, database : Text
, migrations : Text }
, store : { path : Text }
}

View File

@ -4,5 +4,7 @@
, password = "password" , password = "password"
, host = "hostname" , host = "hostname"
, database = "ebook" , database = "ebook"
, migrations = "./migrations"
} }
store = { path = "/tmp/store" }
} }

8
to-flyway.dhall Normal file
View File

@ -0,0 +1,8 @@
\(conf : ./config/Configuration.dhall)
->
''
flyway.locations=filesystem:${conf.database.migrations}/
flyway.url=jdbc:postgresql://${conf.database.host}/${conf.database.database}
flyway.user=${conf.database.username}
flyway.password=${conf.database.password}
''