-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·39 lines (29 loc) · 1.09 KB
/
Makefile
File metadata and controls
executable file
·39 lines (29 loc) · 1.09 KB
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
NETWORK=atom_challenge_network
SUBNET=192.168.100.0/24
.PHONY: check-network create-network check-volumes create-volumes up down clean
check-network:
@if ! docker network inspect $(NETWORK) >/dev/null 2>&1; then \
echo "Network $(NETWORK) no existe. Creando..."; \
docker network create --driver bridge --subnet=$(SUBNET) $(NETWORK); \
else \
echo "Network $(NETWORK) ya existe."; \
fi
create-volumes:
@if ! docker volume inspect atom_challenge_firebase_volume >/dev/null 2>&1; then \
docker volume create atom_challenge_firebase_volume; \
echo "Creado volumen atom_challenge_firebase_volume"; \
fi
check-volumes: create-volumes
up: check-network check-volumes
docker-compose -f infra/docker-compose.yml up -d --build
down:
docker-compose -f infra/docker-compose.yml down
clean: down
docker volume rm atom_challenge_firebase_volume || true
docker network rm $(NETWORK) || true
build-dev:
docker-compose -f infra/docker-compose.yml up --build
build-prod:
docker-compose -f infra/docker-compose.prod.yml up --build
build-env:
docker exec -it atom_challenge_frontend node src/generate-env.ts