Newer
Older
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
UID := 1000
GID := 1000
list:
@echo ""
@echo "Useful targets:"
@echo ""
@echo " rebuild > rebuild all images and start containers for dev only"
@echo " start > start containers"
@echo " restart > restart containers"
@echo " stop > stop and kill running containers"
@echo " status > display stack containers status"
@echo " logs > display containers logs"
@echo " install_client > install client dependencies"
@echo " shell_client > shell into angular client container"
@echo " build_client > generate the angular client dist application (html, css, js)"
@echo " test_client > Starts the angular client unit tests"
@echo " install_server > install server dependencies"
@echo " shell_server > shell into python server container"
@echo " test_server > Starts the server php unit tests"
@echo " phpcs > run php code sniffer test suite"
@echo " create-db > create a database for dev only (need token_enabled=0)"
@echo " remove-pgdata > remove the anis-next database"
@echo ""
rebuild:
@docker-compose up --build -d
start:
@docker-compose up -d
restart: stop start
stop:
@docker-compose kill
@docker-compose rm -v --force
status:
@docker-compose ps
logs:
@docker-compose logs -f -t
install_client:
@docker build -f ./conf-dev/angular-cli.dockerfile -t angular-cli . && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR)/client:/project \
-w /project angular-cli yarn install
shell_client:
@docker-compose exec client bash
build_client:
@docker build -f ./conf-dev/angular-cli.dockerfile -t angular-cli . && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR)/client:/project \
-w /project angular-cli ng build --prod
test_client:
@docker-compose exec client ng test --no-watch --code-coverage
install_server:
@docker run --init -it --rm --user $(UID):$(GID) \
-e COMPOSER_CACHE_DIR=/dev/null \
-v $(CURDIR)/server:/project \
-w /project jakzal/phpqa:php8.0 composer install --ignore-platform-reqs
shell_server:
@docker-compose exec server bash
test_server:
@docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR)/server:/project \
-w /project jakzal/phpqa:php8.0 phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php \
--whitelist src --colors --coverage-html ./phpunit-coverage ./tests
phpcs:
@docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR)/server:/project \
-w /project jakzal/phpqa:php8.0 phpcs --standard=PSR12 --extensions=php --colors src tests
create-db:
@docker-compose exec server sh /mnt/init-keycloak.sh
@docker-compose exec server sh /mnt/create-db.sh
remove-pgdata:
@docker volume rm anis-next_pgdata