-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathjustfile
More file actions
64 lines (54 loc) · 2.18 KB
/
justfile
File metadata and controls
64 lines (54 loc) · 2.18 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
# Shows help
default:
@just --list --justfile {{ justfile() }}
# build the app
build: __install
@-rm -rf dist
@yarn run build --base=./
update:
yarn upgrade-interactive --latest
@echo "Cleaning up node_modules and reinstalling to avoid potential issues..."
-rm -rf node_modules
-rm yarn.lock
yarn install --network-timeout=300000
# run the app in a development mode
run:
@yarn start --host 0.0.0.0
# run dev stack and start the app in a development mode
run-dev:
@echo "Starting the database..."
@docker-compose -f docker-compose-dev.yml up -d postgres
@echo "Starting Synapse..."
@docker-compose -f docker-compose-dev.yml up -d synapse
@echo "Starting Matrix Authenitcation Service..."
@docker-compose -f docker-compose-dev.yml up -d mas
@echo "Starting nginx reverse proxy (Synapse and MAS)..."
@docker-compose -f docker-compose-dev.yml up -d nginx
@echo "Starting Element Web..."
@docker-compose -f docker-compose-dev.yml up -d element
@echo "Ensure admin user is registered..."
@docker-compose -f docker-compose-dev.yml exec mas mas-cli manage register-user --yes --admin -p admin admin || true
@echo "Starting the pre-built (prod version) of the Synapse Admin app on http://localhost:8008/admin ..."
@docker-compose -f docker-compose-dev.yml up -d synapse-admin-prod
@echo "Starting the app..."
@yarn start --host 0.0.0.0
logs-dev *flags:
@docker-compose -f docker-compose-dev.yml logs -f {{ flags }}
# stop the dev stack
stop-dev:
@docker-compose -f docker-compose-dev.yml down
# register a user in the dev stack
register-user localpart password *admin:
docker-compose -f docker-compose-dev.yml exec mas mas-cli manage register-user --yes {{ if admin =="1" {"--admin"} else {"--no-admin"} }} -p {{ password }} {{ localpart }}
# run fixers, formatters, linters, and tests in a strict order
test:
@yarn -s run fix --quiet
@yarn -s run format --log-level warn
@yarn -s run lint --quiet
@yarn -s run test --silent
# run the app in a production mode
run-prod: build
@python -m http.server -d dist 1313
# install the project
__install:
@yarn install --immutable --network-timeout=300000