feat: add full Zonemaster stack with Docker and Spanish UI
- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI) - Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend - Dockerfile.gui: Astro static build served via nginx - docker-compose.yml: backend (internal) + frontend (port 5353) - nginx.conf: root redirects to /es/, /api/ proxied to backend - zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Zonemaster::Backend::Config;
|
||||
use Zonemaster::Engine;
|
||||
|
||||
my $config = Zonemaster::Backend::Config->load_config();
|
||||
|
||||
my $db_engine = $config->DB_engine;
|
||||
print "Configured database engine: $db_engine\n";
|
||||
|
||||
if ( $db_engine =~ /^(MySQL|PostgreSQL|SQLite)$/ ) {
|
||||
print( "Starting database migration\n" );
|
||||
|
||||
_update_result_entries( $config->new_DB()->dbh() );
|
||||
|
||||
print( "\nMigration done\n" );
|
||||
}
|
||||
else {
|
||||
die "Unknown database engine configured: $db_engine\n";
|
||||
}
|
||||
|
||||
|
||||
sub _update_result_entries {
|
||||
my ( $dbh ) = @_;
|
||||
|
||||
$dbh->do(<<SQL) or die 'Migration failed';
|
||||
UPDATE result_entries
|
||||
SET module = 'Backend'
|
||||
WHERE upper(module) = 'BACKEND_TEST_AGENT';
|
||||
SQL
|
||||
}
|
||||
Reference in New Issue
Block a user