-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
65 lines (45 loc) · 2.31 KB
/
makefile
File metadata and controls
65 lines (45 loc) · 2.31 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
MAKEFLAGS += --silent
PROJECT_NAME = emailqueue
DOCKER_APACHE = emailqueue-apache
DOCKER_PHP = emailqueue-php
DOCKER_CRON = emailqueue-cron
DOCKER_DB = emailqueue-mariadb
help: ## Show this help message
echo 'usage: make [target]'
echo
echo 'targets:'
egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#'
up: ## Start the containers
docker-compose -p ${PROJECT_NAME} --file docker/docker-compose.yml up -d
stop: ## Stop the containers
docker-compose -p ${PROJECT_NAME} --file docker/docker-compose.yml stop
down: ## Remove the containers
docker-compose -p ${PROJECT_NAME} --file docker/docker-compose.yml down
restart: ## Restart the containers
$(MAKE) stop && $(MAKE) up
ps: ## Information about the containers
docker-compose -p ${PROJECT_NAME} --file docker/docker-compose.yml ps
apache-build: ## Builds the apache image
docker-compose -p ${PROJECT_NAME} --file docker/docker-compose.yml build emailqueue
apache-log: ## Tail the PHP error log
docker logs -f --details ${DOCKER_APACHE}
apache-ssh: ## SSH into the apache container
docker exec -it -u root ${DOCKER_APACHE} bash
db-build: ## Builds the mariadb image
docker-compose -p ${PROJECT_NAME} --file docker/docker-compose.yml build emailqueue-mariadb
db-log: ## Tail the PHP error log
docker logs -f --details ${DOCKER_DB}
db-ssh: ## SSH into the MariaDB container
docker exec -it -u root ${DOCKER_DB} bash
pull: ## Updates Emailqueue to the latest version
docker exec -it -u root ${DOCKER_APACHE} git -C /emailqueue pull
delivery: ## Process the queue now instead of waiting for the next 1-minute interval. Emails that should be sent on the next Emailqueue call will be sent now.
docker exec -it -u root ${DOCKER_APACHE} /emailqueue/scripts/delivery
purge: ## Purges the queue now instead of waiting for the next programmed purge
docker exec -it -u root ${DOCKER_APACHE} /emailqueue/scripts/purge
flush: ## Removes all the emails in the queue. Use with care, will result in the loss of unsent enqueued emails.
docker exec -it -u root ${DOCKER_APACHE} /emailqueue/scripts/flush
pause: ## Pauses email delivery. No emails will be sent under any circumstances.
docker exec -it -u root ${DOCKER_APACHE} /emailqueue/scripts/pause
unpause: ## Unpauses email delivery. Emails will be sent.
docker exec -it -u root ${DOCKER_APACHE} /emailqueue/scripts/unpause