-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 961 Bytes
/
Makefile
File metadata and controls
52 lines (40 loc) · 961 Bytes
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
.PHONY: upload_pypi tests image up stop setup_conda lint pytest
IMAGE_NAME=mozfldp:latest
all: pytest
build_image:
# Build the docker image
docker build . -t $(IMAGE_NAME)
upload_pypi:
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
setup_conda:
# Install dependencies
conda env update -n mozfldp -f environment.yml
pytest: lint
pytest
# tests:
# python setup.py pytest
lint:
flake8 mozfldp tests
docker_tests:
docker run -it \
-p 127.0.0.1:8090:8000 \
--name mozfldp \
-t --rm $(IMAGE_NAME) \
test
####
#### Use `make up` and `make stop` to run the Docker container locally
####
up:
# Bind 127.0.0.1, port 8090 to the container's port 8000
# and start the server.
#
# Name the container 'mozfldp' so that we can stop the container
# easily
# docker container stop mozfldp || true
docker run -eit \
-p 127.0.0.1:8090:8000 \
--name mozfldp \
-t --rm $(IMAGE_NAME) \
web
stop:
docker stop mozfldp