diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1ad189 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + +*sqlite* \ No newline at end of file diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..9a3b770 --- /dev/null +++ b/Justfile @@ -0,0 +1,39 @@ +# 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." \ No newline at end of file