-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
40 lines (32 loc) · 1.18 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
SHELL := /bin/bash
PORT := 6301
CF_APP ?= notify-email-provider-stub
CF_ORG ?= govuk-notify
.PHONY: freeze-requirements
freeze-requirements: ## create static requirements.txt
pip3 install --upgrade pip-tools
python -c "from notifications_utils.version_tools import copy_config; copy_config()"
pip-compile requirements.in
.PHONY: bump-utils
bump-utils: # Bump notifications-utils package to latest version
python -c "from notifications_utils.version_tools import upgrade_version; upgrade_version()"
.PHONY: bootstrap
bootstrap:
pip install -r requirements.txt
.PHONY: run
run:
$(if ${NOTIFICATION_QUEUE_PREFIX},,$(error Must specify NOTIFICATION_QUEUE_PREFIX))
FLASK_DEBUG=true flask run -p ${PORT}
.PHONY: build-with-docker
build-with-docker:
docker build -f docker/Dockerfile -t email-provider-stub .
.PHONY: run-with-docker
run-with-docker: build-with-docker
$(if ${NOTIFICATION_QUEUE_PREFIX},,$(error Must specify NOTIFICATION_QUEUE_PREFIX))
@docker run \
-p ${PORT}:${PORT} \
-e PORT=${PORT} \
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
-e NOTIFICATION_QUEUE_PREFIX=${NOTIFICATION_QUEUE_PREFIX} \
email-provider-stub