-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (44 loc) · 2.09 KB
/
Makefile
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
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: lde-la-h <[email protected]> +#+ #
# +#+ #
# Created: 2022/06/09 07:50:32 by lde-la-h #+# #+# #
# Updated: 2022/06/28 14:10:43 by lde-la-h ######## odam.nl #
# #
# **************************************************************************** #
#NOTE: Before you start thinking and looking where I implemented the domain
# 'lde-la-h.42.fr', in short, I just didn't bother, doing this would require
# a whole goddamn docker container with this repo in it and running it or
# having it run a vm and install docker there, in short, N O. Its too much effort
# just so you can edit the /etc/hosts file by adding 127.0.0.1 www.lde-la-h.42.fr in there.
# GTFO
# Go to: http://localhost:443/ This is where you static website should be!
include ./srcs/.env
export $(shell sed 's/=.*//' ./srcs/.env)
# Terminal colors
GREEN = \033[32;1m
RED = \033[31;1m
BOLD = \033[1m
RESET = \033[0mls
# Variables
COMPOSE := srcs/docker-compose.yml
up:
@printf "$(GREEN)$(BOLD)\rDocker: $@\n$(RESET)"
@docker-compose -f $(COMPOSE) up -d --build --remove-orphans
down:
@printf "$(GREEN)$(BOLD)\rDocker: $@\n$(RESET)"
@docker-compose -f $(COMPOSE) down -t 2
clean:
@docker-compose -f $(COMPOSE) down --rmi all
re:
#@rm -rf ${HOME}/data
#@mkdir -p ${HOME}/data/mariadb
#@mkdir -p ${HOME}/data/wordpress
#@docker stop all
#@docker rm all
#@docker rmi -f all
@docker-compose -f $(COMPOSE) build --no-cache && docker-compose -f $(COMPOSE) up -d --force-recreate --remove-orphans
.PHONY: up down fdown clean