-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (35 loc) · 1.82 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
#/*****************************************************************************************************************/
#// @author Michael Roberts <[email protected]>
#// @package @observerly/fits
#// @license Copyright © 2021-2024 observerly
#/*****************************************************************************************************************/
# Read .env file and export variables:
include .env
export
#/*****************************************************************************************************************/
# Build the development Docker container:
.PHONY: build
build:
docker-compose --file local.yaml up --build --detach
#/*****************************************************************************************************************/
# Build and execute a command on the development Docker container:
.PHONY: exec
exec:
docker exec $(CONTAINER_NAME) $(CMD)
#/*****************************************************************************************************************/
# Build and run the development Docker container, with a running shell:
.PHONY: dev
dev: build
docker exec --tty --interactive $(CONTAINER_NAME) /bin/zsh
#/*****************************************************************************************************************/
# Stop the running Docker container:
.PHONY: stop
stop:
docker compose --file $(COMPOSE_FILE) down
#/*****************************************************************************************************************/
# Stop and remove the Docker container and network:
.PHONY: clean
clean: stop
docker compose --file $(COMPOSE_FILE) rm --stop --volumes
docker compose --file $(COMPOSE_FILE) down --rmi all --remove-orphans
#/*****************************************************************************************************************/