[#17] Wrote dockerfiles; moved everything to Docker

This commit is contained in:
Jef Roosens 2021-04-12 17:39:52 +02:00
parent 7243be302c
commit 93ec27bb02
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
6 changed files with 112 additions and 63 deletions

View file

@ -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: