swrm/Justfile
2023-11-12 06:43:46 +01:00

39 lines
No EOL
1.3 KiB
Makefile

# Builds a debug container and runs it
dev: start-debug
@echo "Cd into client and run 'npm run dev' to start the client in dev mode."
# Builds a debug container
[private]
build-container-server-debug:
podman build -t fb-server-debug -f container/Containerfile .
# Builds a debug container and runs it
[private]
start-debug: build-container-server-debug remove-podman-containers
podman run -d -p 8080:8080 --name swrm-debug fb-server-debug
@echo "Debug server started."
# Builds a release container
[private]
build-container-release:
podman build -t fb-server -f container/Containerfile .
# Builds a release container and runs it
start-release: build-container-release remove-podman-containers
podman run -d -e DATABASE_URL=sqlite:release.db -p 8080:8080 --name swrm fb-server
# Removes and stops any containers related to the project
[private]
remove-podman-containers:
podman container rm -f swrm
podman container rm -f swrm-debug
# Cleans up everything related to the project
clean: remove-podman-containers
podman image rm -f fb-server
podman image rm -f fb-server-debug
rm -rf client/dist
rm -rf client/node_modules
rm -rf server/public
rm -rf server/target
@echo "Cleaned up! Make sure to run 'just nuke' to nuke everything podman related."