-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 710 Bytes
/
Makefile
File metadata and controls
29 lines (21 loc) · 710 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
-include .env
# Makefile minimal corrigé
.PHONY: help build $(SERVICES) build-%
SERVICES := api frontoffice backoffice showcase mobile nginx mongo mongo_express
.DEFAULT_GOAL := help
help:
@echo "Usage :"
@echo " make [service] -> build + save l'image (ex: make api)"
@echo " make build -> build toutes les images"
@echo
@echo "Services disponibles :"
@for s in $(SERVICES); do echo " - $$s"; done
# Appel simple : make api
$(SERVICES): FORCE
@$(MAKE) build-$@
build: $(addprefix build-,$(SERVICES))
build-%:
docker build --build-arg VITE_API_BASE_URL=$(VITE_API_BASE_URL) -t fitdesk_$* ./$*
docker save fitdesk_$* -o fitdesk_$*.tar
@echo "OK -> fitdesk_$*.tar"
.PHONY: FORCE