github.com/windmilleng/tilt@v0.13.6/integration/same_img_multi_container/Tiltfile (about)

     1  # -*- mode: Python -*-
     2  
     3  include('../Tiltfile')
     4  
     5  # If you get push errors, you can change the default_registry.
     6  # Create tilt_option.json with contents: {"default_registry": "gcr.io/my-personal-project"}
     7  # (with your registry inserted). tilt_option.json is gitignore'd, unlike Tiltfile
     8  default_registry(read_json('tilt_option.json', {})
     9                   .get('default_registry', 'gcr.io/windmill-test-containers/servantes'))
    10  
    11  # We've specifically constructed this image to have
    12  # 1) A sync step
    13  # 2) A RUN step that executes at build time (cp source.txt compiled.txt)
    14  # 3) A RUN step that executes when the container restarts (cp compiled.txt index.html)
    15  docker_build('sameimg', '.',
    16               live_update=[
    17                   sync('.', '/src'),
    18                   run('cp source.txt compiled.txt'),
    19                   run('/src/restart.sh')
    20               ])
    21  k8s_yaml('sameimg.yaml')
    22  k8s_resource('sameimg', port_forwards=['8100:8000', '8101:8001'])