1
0
Fork 0
photos/Tiltfile

105 lines
2.0 KiB
Plaintext

load('ext://restart_process', 'docker_build_with_restart')
local_resource(
'control-go-compile',
'CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/control ./cmd/control',
deps=['cmd/control', 'pkg', 'internal'],
allow_parallel=True,
)
docker_build_with_restart(
'registry.makerforce.io/photos/control',
'.',
entrypoint=['/control'],
dockerfile='build/control/Dockerfile.local',
only=['dist/control'],
live_update=[
sync('dist/control', '/control'),
],
)
docker_build_with_restart(
'registry.makerforce.io/photos/preview',
'.',
entrypoint=['/preview'],
dockerfile='build/preview/Dockerfile',
target='build',
only=['cmd/preview', 'pkg', 'internal', 'go.mod', 'go.sum'],
live_update=[
sync('cmd/preview', '/src/cmd/preview'),
sync('pkg', '/src/pkg'),
sync('internal', '/src/internal'),
run('go build -o /preview'),
],
)
local_resource(
'proxy-go-compile',
'CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/proxy ./cmd/proxy',
deps=['cmd/proxy'],
allow_parallel=True,
)
docker_build_with_restart(
'registry.makerforce.io/photos/proxy',
'.',
entrypoint=['/proxy'],
dockerfile='build/proxy/Dockerfile.local',
only=['dist/proxy'],
live_update=[
sync('dist/proxy', '/proxy'),
],
)
local_resource(
'web-go-compile',
'CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/web ./cmd/web',
deps=['cmd/web', 'pkg', 'internal', 'web'],
allow_parallel=True,
)
docker_build_with_restart(
'registry.makerforce.io/photos/web',
'.',
entrypoint=['/web'],
dockerfile='build/web/Dockerfile.local',
only=['dist/web'],
live_update=[
sync('dist/web', '/web'),
],
)
k8s_yaml('deployments/secrets.yml')
k8s_yaml('deployments/minio-basic.yml')
k8s_resource(
'minio',
port_forwards=[
'9000:9000',
'9001:9001',
],
objects=['minio:secret', 'minio:service'],
)
k8s_yaml('deployments/services.yml')
k8s_resource(
'proxy',
port_forwards=[
'8101',
],
)
k8s_resource(
'control',
port_forwards=[
'8100',
],
)
k8s_resource(
'preview',
port_forwards=[
'8103',
],
)
k8s_resource(
'web',
port_forwards=[
'8104',
],
)