-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTiltfile
77 lines (68 loc) · 1.53 KB
/
Tiltfile
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
allow_k8s_contexts('default')
# Redis ConfigMap and other k8s resources
# k8s_yaml('kube/starcry-dev.yaml')
k8s_yaml(kustomize('kube/dev'))
# Compile the binary
local_resource(
'starcry-binary',
cmd='make debug',
deps=['src/'],
labels=['build']
)
# Define the main starcry image - no need to rebuild it
docker_build(
'docker.io/rayburgemeestre/starcry',
context='.',
live_update=[
sync('./build', '/workdir/build'),
sync('./input', '/workdir/input'),
sync('./docs', '/workdir/docs'),
]
)
local_resource(
'starcry-binary-watcher',
cmd='touch ./build/starcry.stop; sleep 5; rm -rfv ./build/starcry.stop',
deps=['build/starcry'],
labels=['build']
)
# Resource definitions
k8s_resource(
'starcry',
port_forwards=['18080:18080', '10000:10000'],
resource_deps=['redis', 'starcry-binary'],
labels=['app']
)
k8s_resource(
'redis',
port_forwards=['6379:6379'],
labels=['database']
)
k8s_resource(
'starcry-workers',
resource_deps=['starcry', 'redis'],
labels=['workers']
)
# Quasar development server
docker_build(
'docker.io/rayburgemeestre/quasar-dev',
context='./web',
dockerfile_contents='''
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install -g
COPY . .
RUN npm install -g @quasar/cli
EXPOSE 9000
RUN ls -al
CMD ["quasar", "dev"]
''',
live_update=[
sync('./web', '/app'),
]
)
k8s_resource(
'starcry-web',
port_forwards=['9000:9000'],
labels=['web']
)