forked from BattlesnakeOfficial/starter-snake-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.replit
More file actions
107 lines (82 loc) · 1.98 KB
/
.replit
File metadata and controls
107 lines (82 loc) · 1.98 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
modules = ["bash", "python-3.12", "nix"]
[nix]
channel = "stable-25_05"
[packager]
# This makes Replit automatically install requirements.txt
manager = "pip"
requirementsPath = "requirements.txt"
# Main Snake
[[ports]]
localPort = 8000
externalPort = 80
# Test Snake #1
[[ports]]
localPort = 5001
externalPort = 3001
# Test Snake #2
[[ports]]
localPort = 5002
externalPort = 3002
# Test Snake #3
[[ports]]
localPort = 5003
externalPort = 3003
# Board Visualizer
[[ports]]
localPort = 3010
externalPort = 3000
# Rules Server
[[ports]]
localPort = 9999
externalPort = 9000
exposeLocalhost = true
[workflows]
runButton = "Run Your Snake"
[[workflows.workflow]]
name = "Run Your Snake Webserver"
mode = "sequential"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "pip install -r requirements.txt"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "python main.py"
[[workflows.workflow]]
name = "Test Your Snake (Run Snake Webserver first)"
mode = "sequential"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "bash scripts/run_board_rules.sh"
waitForPort = 9999
[[workflows.workflow]]
name = "Run Environment Setup"
mode = "sequential"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "pip install -r requirements.txt"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "bash scripts/setup_submodules.sh"
[[workflows.workflow]]
name = "Run Environment Health Check"
mode = "sequential"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "bash scripts/env_doctor.sh"
[[workflows.workflow]]
name = "Run 3 Test Snake Webservers"
mode = "parallel"
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "PORT=5001 SNAKE_ID=A python -m examples.circle"
waitForPort = 5001
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "PORT=5002 SNAKE_ID=B python -m examples.hungry"
waitForPort = 5002
[[workflows.workflow.tasks]]
task = "shell.exec"
args = "PORT=5003 SNAKE_ID=C python -m examples.dodge"
waitForPort = 5003
[deployment]
run = ["sh", "-c", "python main.py"]