Migrations configuration
This commit is contained in:
		@@ -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 }
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								config/Configuration.dhall
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								config/Configuration.dhall
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					{ database : { username : Text
 | 
				
			||||||
 | 
					             , password : Text
 | 
				
			||||||
 | 
					             , host : Text
 | 
				
			||||||
 | 
					             , database : Text
 | 
				
			||||||
 | 
					             , migrations : Text }
 | 
				
			||||||
 | 
					, store : { path : Text }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -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
									
								
							
							
						
						
									
										8
									
								
								to-flyway.dhall
									
									
									
									
									
										Normal 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}
 | 
				
			||||||
 | 
					''
 | 
				
			||||||
		Reference in New Issue
	
	Block a user