-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (35 loc) · 933 Bytes
/
Makefile
File metadata and controls
41 lines (35 loc) · 933 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
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
## help: Print this help message
help:
@echo
@echo "Usage:"
@echo
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | sort
@echo
.PHONY: help
## backend: Build and run the backend from source
backend:
@cd backend && CGO_ENABLED=0 HTTP_PORT=8080 go run .
.PHONY: backend
## frontend: Build and run the frontend from source
frontend:
@npm run serve
.PHONY: frontend
## dev: Build and run in Docker
dev:
docker build -t rfd-fyi:dev .
docker run --rm --name rfd-fyi -p 8080:8080 rfd-fyi:dev
.PHONY: dev
## prod: Run the latest image in Docker
prod:
@docker run -d --name rfd-fyi -p 8080:8080 ghcr.io/davegallant/rfd-fyi --pull always
.PHONY: prod
## teardown: Teardown Docker
teardown:
docker stop rfd-fyi || true
docker rm rfd-fyi || true
.PHONY: teardown