2023-10-18 20:52:51 +02:00
|
|
|
# Builds a debug container and runs it
|
|
|
|
# Starts the client in dev mode
|
2023-10-19 02:31:54 +02:00
|
|
|
dev: start-debug
|
|
|
|
@echo "Cd into client and run 'npm run dev' to start the client in dev mode."
|
2023-10-17 19:43:26 +02:00
|
|
|
|
2023-10-18 20:52:51 +02:00
|
|
|
# Builds the client with npm (result in client/distt
|
|
|
|
npm-install:
|
2023-10-17 19:43:26 +02:00
|
|
|
cd client && npm install
|
2023-10-18 20:52:51 +02:00
|
|
|
|
|
|
|
# Builds the client with npm (result in client/dist)
|
|
|
|
npm-build: npm-install
|
2023-10-17 19:43:26 +02:00
|
|
|
cd client && npm run build
|
|
|
|
|
2023-10-18 20:52:51 +02:00
|
|
|
# Builds a debug container
|
|
|
|
build-container-server-debug:
|
|
|
|
podman build -t fb-server-debug -f ContainerfileDebug .
|
|
|
|
|
|
|
|
# Builds a debug container and runs it
|
|
|
|
start-debug: build-container-server-debug
|
|
|
|
podman container rm -f frostbyte-debug
|
|
|
|
podman run -d -p 8080:8080 --name frostbyte-debug fb-server-debug
|
2023-10-19 02:31:54 +02:00
|
|
|
@echo "Debug server started."
|
2023-10-18 20:52:51 +02:00
|
|
|
|
|
|
|
# Builds a release container
|
|
|
|
build-container-release:
|
2023-10-18 19:05:10 +02:00
|
|
|
podman build -t fb-server .
|
2023-10-17 19:43:26 +02:00
|
|
|
|
2023-10-18 20:52:51 +02:00
|
|
|
# Builds a release container and runs it
|
|
|
|
start-release: build-container-release
|
2023-10-18 03:47:29 +02:00
|
|
|
podman container rm -f frostbyte
|
|
|
|
podman run -d -p 8080:8080 --name frostbyte fb-server
|
2023-10-17 19:43:26 +02:00
|
|
|
|
2023-10-18 20:52:51 +02:00
|
|
|
# Deletes everything podman related (even unrelated to the project)
|
|
|
|
prune-podman:
|
|
|
|
podman stop -a
|
|
|
|
podman rm -af
|
|
|
|
podman system prune -af
|
|
|
|
podman image rm -af
|
|
|
|
podman system reset --force
|
|
|
|
|
|
|
|
# Cleans up everything related to the project
|
2023-10-17 19:43:26 +02:00
|
|
|
clean:
|
|
|
|
podman container rm -f frostbyte
|
2023-10-18 20:52:51 +02:00
|
|
|
podman container rm -f frostbyte-debug
|
2023-10-18 03:47:29 +02:00
|
|
|
podman image rm -f fb-server
|
2023-10-18 20:52:51 +02:00
|
|
|
podman image rm -f fb-server-debug
|
2023-10-17 19:43:26 +02:00
|
|
|
rm -rf client/dist
|
|
|
|
rm -rf client/node_modules
|
|
|
|
rm -rf server/public
|
2023-10-18 20:52:51 +02:00
|
|
|
rm -rf server/target
|
|
|
|
@echo "Cleaned up! Make sure to run 'just prune-podman' to nuke everything podman related."
|
|
|
|
|
|
|
|
# Nukes everything. No mercy. Leave no trace.
|
|
|
|
nuke: clean prune-podman
|
|
|
|
@echo "Nuked everything! You're starting from scratch now."
|