[32788f42] Keine Zusammenfassung angegeben.

Keine Zusammenfassung angegeben.
This commit is contained in:
2026-04-08 16:39:30 +00:00
parent 2cfda1da57
commit e8c2cdfff9
6 changed files with 409 additions and 275 deletions

View File

@@ -0,0 +1,66 @@
import yaml
with open('docker-compose.yml', 'r') as f:
data = yaml.safe_load(f)
services = data.get('services', {})
# We only keep the following core services
core_services = [
'nginx',
'dashboard',
'company-explorer',
'transcription-tool'
]
# Create a filtered services dict
new_services = {}
for k, v in services.items():
if k in core_services:
new_services[k] = v
# Add fotograf-de services since they are in subdirectories but belong to the main stack
new_services['fotograf-de-scraper-backend'] = {
'build': {
'context': './fotograf-de-scraper/backend',
'dockerfile': 'Dockerfile'
},
'container_name': 'fotograf-de-scraper-backend',
'env_file': ['./fotograf-de-scraper/.env'],
'environment': ['TZ=Europe/Berlin'],
'ports': ['8002:8000'],
'volumes': [
'./fotograf-de-scraper/backend:/app',
'./fotograf-de-scraper/backend/data:/app/data'
],
'restart': 'unless-stopped'
}
new_services['fotograf-de-scraper-frontend'] = {
'build': {
'context': './fotograf-de-scraper/frontend',
'dockerfile': 'Dockerfile',
'args': {'VITE_API_BASE_URL': '/fotograf-de-api'}
},
'container_name': 'fotograf-de-scraper-frontend',
'ports': ['3009:80'],
'depends_on': ['fotograf-de-scraper-backend'],
'restart': 'unless-stopped'
}
# Update NGINX depends_on
if 'nginx' in new_services and 'depends_on' in new_services['nginx']:
new_services['nginx']['depends_on'] = {
'dashboard': {'condition': 'service_started'},
'company-explorer': {'condition': 'service_healthy'},
'transcription-tool': {'condition': 'service_started'},
'fotograf-de-scraper-frontend': {'condition': 'service_started'}
}
data['services'] = new_services
# Prune unused volumes
data['volumes'] = {'transcription_uploads': {}}
with open('docker-compose.yml', 'w') as f:
yaml.dump(data, f, sort_keys=False)