Skip to content

Commit b71e0dc

Browse files
committed
added start commands to top Makefile, add enter_www
1 parent d192ef1 commit b71e0dc

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

Makefile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
SHELL = /bin/bash
2+
DOCKER_EXEC_DJANGO=$(shell command -v docker > /dev/null && echo "docker-compose exec -T django")
3+
DOCKER_EXEC_VUE=$(shell command -v docker > /dev/null && echo "docker-compose exec vue")
4+
DOCKER_EXEC_WWW=$(shell command -v docker > /dev/null && echo "docker-compose exec www")
5+
26
.PHONY: tests
37

48
init:
@@ -17,10 +21,26 @@ push:
1721
cd vue && make push
1822

1923
enter_django:
20-
cd django && make enter
24+
$(DOCKER_EXEC_DJANGO) ash
2125

2226
enter_vue:
23-
cd vue && make enter
27+
$(DOCKER_EXEC_VUE) ash
28+
29+
enter_www:
30+
$(DOCKER_EXEC_WWW) ash
31+
32+
start_vue:
33+
$(DOCKER_EXEC_VUE) make
34+
35+
start_django:
36+
$(DOCKER_EXEC_DJANGO) make
37+
38+
start_screenshotservice:
39+
$(DOCKER_EXEC_VUE) make screenshotservice
40+
41+
reload_www:
42+
$(DOCKER_EXEC_WWW) sh -c 'openresty -t & openresty -s reload'
43+
2444

2545
deploy_prod:
2646
cd vue && make build

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For a tour of the app and a testing protocol see [`docs/testing.md`](/docs/testi
2424

2525
## setup project
2626

27-
Add `django` to the 127.0.0.1 entry in `/etc/hosts` (for screenshot service).
27+
Add `www.local` and `django` to the 127.0.0.1 entry in `/etc/hosts` (for screenshot service).
2828

2929
```bash
3030
touch env.hosts.prod # required file, can be empty and edited later
@@ -66,6 +66,19 @@ Database files and static generated files are stored in `var` folder.
6666
make up
6767
```
6868

69+
**start services**
70+
71+
```bash
72+
# 1. shell
73+
make start_vue
74+
# 2. shell
75+
make start_django
76+
# 3. shell
77+
make start_screenshotservice
78+
```
79+
80+
You can also start the vue / django service from the vscode shell (see editor).
81+
6982
### tests
7083

7184
```bash

0 commit comments

Comments
 (0)