feature(docker): Implemented DockerFile, docker compose .env and updated the run.sh file.
This commit is contained in:
13
run.sh
13
run.sh
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Load .env if exists
|
||||
if [ -f .env ]; then
|
||||
export $(grep -v '^#' .env | xargs)
|
||||
fi
|
||||
|
||||
# Core service switches.
|
||||
export WARPBOX_GUEST_UPLOADS_ENABLED="${WARPBOX_GUEST_UPLOADS_ENABLED:-true}"
|
||||
export WARPBOX_API_ENABLED="${WARPBOX_API_ENABLED:-true}"
|
||||
@@ -26,4 +31,10 @@ export WARPBOX_DATA_DIR="${WARPBOX_DATA_DIR:-./data}"
|
||||
export WARPBOX_ADMIN_ENABLED="${WARPBOX_ADMIN_ENABLED:-true}"
|
||||
export WARPBOX_ADMIN_PASSWORD="${WARPBOX_ADMIN_PASSWORD:-123}"
|
||||
|
||||
go run ./cmd/main.go run
|
||||
# Option to run via Docker Compose
|
||||
if [ "${1:-}" = "--docker" ]; then
|
||||
docker-compose up --build
|
||||
exit 0
|
||||
fi
|
||||
|
||||
go run ./cmd/main.go run
|
||||
Reference in New Issue
Block a user