- fix Dockerfile
This commit is contained in:
@@ -10,19 +10,20 @@ import '../models/geoposition.dart';
|
||||
import '../models/log.dart';
|
||||
|
||||
class DatabaseProvider {
|
||||
late Connection _dbConnection;
|
||||
|
||||
DatabaseProvider({required this.dotEnv});
|
||||
late Connection _dbConnection;
|
||||
final DotEnv dotEnv;
|
||||
final Map<String, String> _shareLinks = {};
|
||||
final _uuid = const Uuid();
|
||||
|
||||
Future<void> initialize() async {
|
||||
final dotenv = DotEnv();
|
||||
|
||||
final host = dotenv['POSTGRES_HOST'] ?? 'db';
|
||||
final port = int.parse(dotenv['POSTGRES_PORT'] ?? '5432');
|
||||
final databaseName = dotenv['POSTGRES_DB'] ?? 'family_safety';
|
||||
final username = dotenv['POSTGRES_USER'] ?? 'postgres';
|
||||
final password = dotenv['POSTGRES_PASSWORD'] ?? 'postgres';
|
||||
final host = dotEnv['POSTGRES_HOST'] ?? 'db';
|
||||
final port = int.parse(dotEnv['POSTGRES_PORT'] ?? '5432');
|
||||
final databaseName = dotEnv['POSTGRES_DB'] ?? 'family_safety';
|
||||
final username = dotEnv['POSTGRES_USER'] ?? 'postgres';
|
||||
final password = dotEnv['POSTGRES_PASSWORD'] ?? 'postgres';
|
||||
|
||||
try {
|
||||
final defaultConnection = await Connection.open(
|
||||
|
||||
Reference in New Issue
Block a user