Skip to content
Snippets Groups Projects
Commit 09677087 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Add commands => DONE

parent 717fc9da
No related branches found
No related tags found
2 merge requests!813.1,!76Add commands => DONE
UID := $(id -u)
GID := $(id -g)
NAME_APP=anis-client
# UID := 1000
# GID := 1000
......@@ -9,13 +10,14 @@ list:
@echo "Useful targets:"
@echo ""
@echo " install > install node modules dependancies (node_modules)"
@echo " start > run a dev server for anis client application (in memory)"
@echo " stop > stop the dev server for anis client application"
@echo " restart > restart the dev server for anis client (container)"
@echo " test > run anis client tests"
@echo " ng-build > generate the angular dist application (html, css, js)"
@echo " logs > display anis client container logs"
@echo " shell > shell into anis client container"
@echo " start > run a dev server for $(NAME_APP) application (in memory)"
@echo " stop > stop the dev server for $(NAME_APP) application"
@echo " restart > restart the dev server for $(NAME_APP) (container)"
@echo " status > display $(NAME_APP) container status"
@echo " test > run $(NAME_APP) tests"
@echo " dist > generate the angular dist application (html, css, js)"
@echo " logs > display $(NAME_APP) container logs"
@echo " shell > shell into $(NAME_APP) container"
@echo ""
install:
......@@ -25,7 +27,7 @@ install:
start:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
--name anis-client \
--name $(NAME_APP) \
-p 4200:4200 \
-p 9876:9876 \
-v $(CURDIR):/project -d \
......@@ -34,20 +36,23 @@ start:
restart: stop start
stop:
@docker stop anis-client
@docker stop $(NAME_APP)
restart: stop start
status:
@docker ps -f name=$(NAME_APP)
test:
@docker exec -ti anis-client ng test --no-watch
@docker exec -ti $(NAME_APP) ng test --no-watch
ng-build:
dist:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
-w /project anis-node ng build --prod
logs:
@docker logs -f -t anis-client
@docker logs -f -t $(NAME_APP)
shell:
@docker exec -ti anis-client bash
@docker exec -ti $(NAME_APP) bash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment