-
Notifications
You must be signed in to change notification settings - Fork 1
/
mprocs-cacvote-mark.yaml
44 lines (40 loc) · 1.79 KB
/
mprocs-cacvote-mark.yaml
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
procs:
instructions:
shell: |
echo "CACvote Mark is where voters can cast their ballots."
echo ""
echo "\e[1mTips:\e[0m"
echo "- Some steps need to be completed on CACvote JX Terminal,"
echo " which cannot run at the same time as CACvote Mark. To switch,"
echo " exit the current mprocs session and start the other one."
echo "- Run the 'reset-db' process below to reset the database."
echo "- To exit mprocs, type 'q' to quit and then 'y' to confirm."
echo ""
echo "The application will launch in 'kiosk-browser' when it's ready."
sleep 30d
cacvote-mark:
cwd: 'apps/cacvote-mark/frontend'
shell: |
export EG_CLASSPATH=${EG_CLASSPATH:-../../../../egk-ec-mixnet/build/libs/egk-ec-mixnet-2.1-SNAPSHOT-uber.jar}
pnpm tsc --build && pnpm start
cacvote-server-backend:
cwd: 'apps/cacvote-server/backend'
shell: |
export EG_CLASSPATH=${EG_CLASSPATH:-../../../../egk-ec-mixnet/build/libs/egk-ec-mixnet-2.1-SNAPSHOT-uber.jar}
cargo watch -- cargo run
kiosk-browser:
cwd: '../kiosk-browser'
shell: |
echo "Waiting for CACvote Mark to start…"
while ! curl --silent --fail localhost:3000/api/status; do sleep 1; done
kiosk-browser --allow-devtools http://localhost:3000/
reset-db:
cwd: 'apps/cacvote-mark/backend'
autostart: false
shell: |
psql cacvote -c 'DELETE FROM scanned_mailing_label_codes; DELETE FROM machines; DELETE FROM journal_entries; DELETE FROM objects;'
psql cacvote_jx -c 'DELETE FROM eg_private_keys; DELETE FROM journal_entries; DELETE FROM objects;'
if [ -f dev-workspace/cacvote-mark.db ]; then
sqlite3 dev-workspace/cacvote-mark.db 'DELETE FROM journal_entries; DELETE FROM objects;'
fi
echo "Database reset complete."