-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
82 lines (63 loc) · 1.59 KB
/
Makefile
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
# Generate the proto schema for config files
.PHONY: schema
schema:
protoc -I=app/config/schema --python_out=app/jitsi/schema app/config/schema/*.proto
.PHONY: clean-schema
clean-schema:
rm -rf app/jitsi/schema/*pb2.py
.env:
$(shell \
cp env.template.sh .env; \
./gen-passwords.sh; \
TZ=$$(readlink /etc/localtime | grep -oE '[a-zA-Z_]+/[a-zA-Z_]+$$'); \
perl -pi -e "s#TZ=.*#TZ=$${TZ}#g" .env \
)
env: .env
.PHONY: clean-env
clean-env:
rm -rf .env
.PHONY: npm-update
npm-update: env
docker-compose build node
docker-compose run node cp /package-lock.json /app/client/package-lock.json
theme = app/client/styles/themes/_active.scss
$(theme):
app/set_theme.sh basic
.PHONY: clean-theme
clean-theme:
rm -rf $(theme)
js = app/client/js
webpack-files := $(js)/bundle.js $(js)/bundle.js.map
$(webpack-files)&: env schema $(theme)
docker-compose run node /node_modules/.bin/webpack
.PHONY: webpack
webpack: $(webpack-files)
.PHONY: clean-webpack
clean-webpack:
rm -rf $(webpack-files)
.PHONY: up
up: webpack env schema
docker-compose up -d
.PHONY: restart
restart:
docker-compose restart
.PHONY: db
db:
docker-compose exec -e 'FLASK_ENV=production' -e 'FLASK_APP=manager.py' web-worker_1 flask create-db
.PHONY: chat
chat:
docker-compose exec prosody profanity -a guest
.PHONY: clean-docker
clean-docker:
docker-compose down
.PHONY: clean-config
clean-config:
rm -f app/config/overrides
.PHONY: clean
clean: env clean-docker clean-env clean-config clean-schema clean-theme clean-webpack
.PHONY: format-config
format-config:
./format_configs.sh
.PHONY: pull
pull: env
docker-compose pull