- Moved `httpconnection` import from `clients` to `core`. - Changed `tfgrid-sdk-ts` dashboard to playground. - Added ipaddr to node_local(). - Added public keyword to OpenSSLGenerateArgs. - Improved DockerEngine image and container loading. - Added utils.contains_ssh_port. - Improved error handling in DockerEngine. - Improved Docker registry handling. Co-authored-by: mariobassem12 <mariobassem12@gmail.com> Co-authored-by: omda <mahmmoud.hassanein@gmail.com>
27 lines
876 B
GLSL
Executable File
27 lines
876 B
GLSL
Executable File
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
|
|
|
import freeflowuniverse.herolib.virt.docker
|
|
import os
|
|
|
|
registration_code := os.getenv('PRESEARCH_CODE')
|
|
|
|
if registration_code == '' {
|
|
println("Can't find presearch registration code please run 'export PRESEARCH_CODE=...'")
|
|
exit(1)
|
|
}
|
|
|
|
mut engine := docker.new(prefix: '', localonly: true)!
|
|
mut recipe := engine.compose_new(name: 'presearch')
|
|
mut presearch_node := recipe.service_new(name: 'presearch_node', image: 'presearch/node')!
|
|
|
|
presearch_node.volume_add('/presearch-node-storage', '/app/node')!
|
|
presearch_node.env_add('REGISTRATION_CODE', '${registration_code}')
|
|
|
|
mut presearch_updater := recipe.service_new(
|
|
name: 'presearch_updater'
|
|
image: 'presearch/auto-updater'
|
|
)!
|
|
presearch_updater.volume_add('/var/run/docker.sock', '/var/run/docker.sock')!
|
|
|
|
recipe.start()!
|