forked from mark-lightfoot/python-systemd-http-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 642 Bytes
/
Makefile
File metadata and controls
26 lines (20 loc) · 642 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
.PHONY = install uninstall docker_up docker_destroy
NAME = python-http-server
INSTALL_LOCATION = /opt/${NAME}
SERVICE_SCRIPT = /etc/systemd/system/${NAME}.service
systemd_install:
@cp ${NAME}.service ${SERVICE_SCRIPT}
@mkdir -p ${INSTALL_LOCATION}
@cp app.py ${INSTALL_LOCATION}
@cp -r public ${INSTALL_LOCATION}
@systemctl daemon-reload
systemd_uninstall:
@rm -rf ${INSTALL_LOCATION}
@rm -rf ${SERVICE_SCRIPT}
docker_up:
@docker build -t bobcrutchley/${NAME}:latest .
@docker run -d -p 9000:9000 --name ${NAME} bobcrutchley/${NAME}
docker_destroy:
@docker stop ${NAME}
@docker rm ${NAME}
@docker rmi bobcrutchley/${NAME}