-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 934 Bytes
/
Makefile
File metadata and controls
45 lines (37 loc) · 934 Bytes
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
ROOT_PATH := $(shell pwd)
PACKAGE_PATH := $(ROOT_PATH)/src/flatbot
.PHONY: cert
cert:
@openssl req -x509 \
-newkey rsa:2048 \
-keyout $(ROOT_PATH)/ssl/private.pem \
-out $(ROOT_PATH)/ssl/cert.pem \
-days 90 \
-nodes \
-subj "/CN=192.168.100.106" \
-reqexts v3_ca \
-config $(ROOT_PATH)/ssl/openssl.cnf
@openssl dhparam \
-out $(ROOT_PATH)/ssl/dhparam.pem \
2048
# Local development #
.PHONY: test-db
test-db:
@ROOT_PATH=$(ROOT_PATH) bash scripts/db/run_test_db.sh
@sleep 2
@(export CONFIG_PATH=$(TEST_CONFIG_PATH); \
python scripts/db/setup_db.py && \
python scripts/db/add_user.py user password)
.PHONY: clean
clean:
@rm -rf \
`find $(ROOT_PATH) -name '__pycache__'` \
$(PACKAGE_PATH).egg-info
@docker stop pg-test
# Docker #
.PHONY: docker-add-user
docker-add-user:
@docker-compose exec server /flatbot/scripts/add_user.py kuba haslo
.PHONY: docker-run
docker-run:
@docker-compose up .