diff --git a/docker_install.v b/docker_install.v index 6fa010d..12fcdca 100644 --- a/docker_install.v +++ b/docker_install.v @@ -50,12 +50,30 @@ state: println(' Wrote: ${target_dir}/dashboard.html') } + // Copy Dockerfile and sources for build + if os.exists('Dockerfile') { + os.cp('Dockerfile', '${target_dir}/Dockerfile') or {} + println(' Wrote: ${target_dir}/Dockerfile') + } + // Copy V source files + src_files := ['main.v', 'server.v', 'config.v', 'log.v', 'ntfy.v', 'dedup.v', + 'docker_watcher.v', 'service.v', 'filter_outgoing.v', 'metrics.v', + 'docker_install.v', 'v.mod', 'dashboard.html', 'ntfy-bridge.example.yaml', + 'sources/event.v', 'sources/gitea.v', 'sources/uptime_kuma.v', + 'sources/docker.v', 'sources/generic.v', 'sources/cron.v', + 'sources/http_poll.v'] + for file in src_files { + if os.exists(file) { + target := '${target_dir}/${file}' + os.mkdir_all(os.dir(target)) or {} + os.cp(file, target) or {} + } + } + // docker-compose.yml mut compose := 'services: ntfy-bridge: - build: - context: https://git.dracodev.net/bruno/ntfy-bridge.git - dockerfile: Dockerfile + build: . container_name: ntfy-bridge restart: unless-stopped ports: