[#17] Wrote dockerfiles; moved everything to Docker
This commit is contained in:
parent
7243be302c
commit
93ec27bb02
6 changed files with 112 additions and 63 deletions
25
Makefile
25
Makefile
|
|
@ -1,35 +1,36 @@
|
|||
IMAGE := chewingbever/fej
|
||||
|
||||
|
||||
all: debug
|
||||
.PHONY: all
|
||||
|
||||
# Builds
|
||||
debug:
|
||||
@ cargo build
|
||||
@ ./build -m dev
|
||||
.PHONY: debug
|
||||
|
||||
release:
|
||||
@ cargo build --release
|
||||
@ ./build -m rel
|
||||
.PHONY: release
|
||||
|
||||
image: Dockerfile
|
||||
@ ./build '$(IMAGE)'
|
||||
.PHONY: image
|
||||
|
||||
push:
|
||||
@ ./build '$(IMAGE)' push
|
||||
@ ./build -m prod -a push
|
||||
.PHONY: push
|
||||
|
||||
# Run
|
||||
run:
|
||||
@ RUST_BACKTRACE=1 cargo run --bin fej
|
||||
@ ./build -m dev -a run
|
||||
.PHONY: run
|
||||
|
||||
stop:
|
||||
@ docker stop -t 2 fej
|
||||
.PHONY: stop
|
||||
|
||||
logs:
|
||||
@ docker logs -f fej
|
||||
.PHONY: logs
|
||||
|
||||
|
||||
# Testing
|
||||
test:
|
||||
@ cargo test --no-fail-fast
|
||||
@ ./build -m dev -a run -l -- test --no-fail-fast
|
||||
.PHONY: test
|
||||
|
||||
format:
|
||||
|
|
|
|||
Reference in a new issue