-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathTiltfile
More file actions
78 lines (68 loc) · 1.85 KB
/
Tiltfile
File metadata and controls
78 lines (68 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env python
load('ext://restart_process', 'docker_build_with_restart')
load('ext://color', 'color')
load('ext://dotenv', 'dotenv')
analytics_settings(True) # Enable telemetry dialogue in web UI
disable_snapshots() # Disable TiltCloud Snapshots
version_settings(True) # Enable 'new version' banner
# Load environment variables from .env file
dotenv()
# Allow users to run `tilt up --stream` for better log handling
allow_k8s_contexts('minikube')
# Build the Docker image
custom_build(
ref='fuel-explorer:local',
command=[
'./cluster/scripts/build-image.sh',
'--image-name', 'fuel-explorer',
'--dockerfile', './deployment/Dockerfile',
],
deps=[
'deployment/Dockerfile',
'packages',
'pnpm-lock.yaml',
'pnpm-workspace.yaml'
],
live_update=[
sync('packages', '/app'),
sync('pnpm-lock.yaml', '/app/pnpm-lock.yaml'),
sync('pnpm-workspace.yaml', '/app/pnpm-workspace.yaml'),
run('pnpm install --frozen-lockfile', trigger=['pnpm-lock.yaml']),
run('pnpm build:lib', trigger=['packages']),
],
ignore=['node_modules']
)
# Create namespace
k8s_yaml(blob("""
apiVersion: v1
kind: Namespace
metadata:
name: fuel-explorer
"""))
# Deploy Helm chart
k8s_yaml(helm(
'cluster/chart',
values=['cluster/chart/values.yaml'],
name='fuel-explorer-local',
namespace='fuel-explorer'
))
# Port forwards for services
k8s_resource(
'fuel-explorer-local-api',
port_forwards=['3000:3000']
)
k8s_resource(
'fuel-explorer-local-syncer',
port_forwards=['3001:3001']
)
# Resource grouping for better UI organization
k8s_resource(
'fuel-explorer-local-postgresql',
new_name='postgresql',
port_forwards=['5432:5432']
)
k8s_resource(
'fuel-explorer-local-rabbitmq',
new_name='rabbitmq',
port_forwards=['5672:5672']
)