-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·44 lines (35 loc) · 1.17 KB
/
makefile
File metadata and controls
executable file
·44 lines (35 loc) · 1.17 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
40
41
42
43
44
# ENV
DOCKER_COMP = docker compose
PHP = $(PHP_CONT) php
PHP_CONT = $(DOCKER_COMP) exec php-fpm
NODE_CONT = $(DOCKER_COMP) exec node
## Initialize containers
init:
if [ ! -d build/dev/certs ]; then mkdir -p build/dev/certs; fi
if [ ! -f build/dev/certs/tls.crt ]; then mkcert -key-file build/dev/certs/tls.key -cert-file build/dev/certs/tls.crt localhost; fi
rm -f src/.gitkeep
docker network inspect apps >/dev/null 2>&1 || docker network create apps;
@$(DOCKER_COMP) build --pull --no-cache;
@$(DOCKER_COMP) up --detach; \
mv build/dev/.github .github;
## Docker
rebuild: ## Builds the Docker images
@$(DOCKER_COMP) build php-fpm
@$(DOCKER_COMP) build --pull --no-cache
@$(DOCKER_COMP) up --detach
reload: ## Builds the Docker images
@$(DOCKER_COMP) build php-fpm
@$(DOCKER_COMP) build
@$(DOCKER_COMP) up --detach
up: ## Start the docker hub in detached mode (no logs)
@$(DOCKER_COMP) up --detach
down: ## Stop the docker hub
@$(DOCKER_COMP) down --remove-orphans
logs: ## Show live logs
@$(DOCKER_COMP) logs --tail=0 --follow
php:
@$(PHP_CONT) bash
node:
@$(NODE_CONT) bash
node-sync:
sudo docker compose cp node:/app/src/node_modules ./src