-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathTiltfile
More file actions
128 lines (111 loc) · 2.89 KB
/
Tiltfile
File metadata and controls
128 lines (111 loc) · 2.89 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
allow_k8s_contexts('default')
k8s_yaml(kustomize("./overlays/dev", kustomize_bin="./kustomize"))
docker_build(
"ghcr.io/5stackgg/api:latest",
"../api",
dockerfile='../api/Dockerfile.dev',
live_update=[
sync('../api', '/opt/5stack'),
run('yarn install', trigger=['package.json', 'yarn.lock']),
],
)
docker_build(
"ghcr.io/5stackgg/web:latest",
"../web",
dockerfile='../web/Dockerfile.dev',
live_update=[
sync('../web', '/opt/5stack'),
run('yarn install', trigger=['package.json', 'yarn.lock']),
],
)
# docker_build(
# "ghcr.io/5stackgg/game-server:latest",
# "../game-server",
# dockerfile='../game-server/Dockerfile.dev',
# live_update=[
# sync('../game-server', '/opt/5stack'),
# ],
# )
docker_build(
"ghcr.io/5stackgg/game-server-node-connector:latest",
"../game-server-node-connector",
dockerfile='../game-server-node-connector/Dockerfile.dev',
live_update=[
sync('../game-server-node-connector', '/opt/5stack'),
run('yarn install', trigger=['package.json', 'yarn.lock']),
],
)
k8s_resource(
'api',
new_name='api',
resource_deps=['timescaledb', 'redis', 'hasura'],
port_forwards=['5585:5585'],
labels=['application'],
links=['api.5stack.localhost', 'queues.5stack.localhost', 'tv.5stack.localhost'],
)
k8s_resource(
'web',
new_name='web',
port_forwards=['3000:3000'],
labels=['application'],
links=['5stack.localhost'],
)
k8s_resource(
'game-server-node-connector',
new_name='game-server-node-connector',
resource_deps=['timescaledb', 'redis', 'hasura'],
port_forwards=['8585:8585'],
labels=['application'],
)
k8s_resource(
'timescaledb',
port_forwards=['5432:5432'],
labels=['infrastructure'],
)
k8s_resource(
'redis',
port_forwards=['6379:6379'],
labels=['infrastructure'],
)
k8s_resource(
'typesense',
port_forwards=['8108:8108'],
labels=['infrastructure'],
)
k8s_resource(
'minio',
port_forwards=['9000:9000', '9090:9090'],
labels=['infrastructure'],
links=['console.5stack.localhost'],
)
k8s_resource(
'hasura',
port_forwards=['8080:8080'],
resource_deps=['timescaledb'],
labels=['application'],
links=['hasura.5stack.localhost'],
)
k8s_resource(
'demo-parser',
labels=['application'],
)
# k8s_resource(
# 'dev-game-server',
# port_forwards=['27015:27015', '27020:27020'],
# labels=['application'],
# )
k8s_resource(
'postgres-backup',
labels=['infrastructure'],
)
local_resource(
'tls-secret',
cmd=(
'kubectl create secret tls 5stack-ssl ' +
'--cert=overlays/dev/certs/_wildcard.5stack.localhost+1.pem ' +
'--key=overlays/dev/certs/_wildcard.5stack.localhost+1-key.pem ' +
'-n 5stack --dry-run=client -o yaml | kubectl apply -f -'
),
labels=['tls-setup'],
resource_deps=['web'],
)