Add example environment configuration and Docker Compose setup
CI / Go Tests (push) Failing after 9s
CI / Build (push) Successful in 9s
Format / gofmt (push) Successful in 7s
Release Artifacts / Validate release tag (push) Successful in 1s
Release Artifacts / Build and release executables (push) Failing after 8s
Release Artifacts / Build and release Docker image (push) Has been skipped
CI / Go Tests (push) Failing after 9s
CI / Build (push) Successful in 9s
Format / gofmt (push) Successful in 7s
Release Artifacts / Validate release tag (push) Successful in 1s
Release Artifacts / Build and release executables (push) Failing after 8s
Release Artifacts / Build and release Docker image (push) Has been skipped
- Introduced a new `.env.example` file to provide a template for environment variables used by the Scratchbox server. - Added a `docker-compose.example.yml` file to facilitate easy deployment of the Scratchbox service with Docker. - Updated `docker-entrypoint.sh` to enforce environment variable settings for server configuration. - Removed the generation of a config key file from the workflow, simplifying the configuration process. - Adjusted the README.md to reflect changes in configuration management and usage instructions.
This commit is contained in:
@@ -5,13 +5,12 @@ BIN := $(BIN_DIR)/$(APP_NAME)
|
||||
CONFIG ?= config.yaml
|
||||
DOCKER_IMAGE ?= scratchbox:dev
|
||||
|
||||
.PHONY: help run dev config build docker test test-race fmt clean
|
||||
.PHONY: help run dev build docker test test-race fmt clean
|
||||
|
||||
help:
|
||||
@echo "Targets:"
|
||||
@echo " make run - Alias for make dev"
|
||||
@echo " make dev - Build and run server (CONFIG=$(CONFIG))"
|
||||
@echo " make config - Write default config to $(CONFIG) and generate sibling config.key if missing"
|
||||
@echo " make build - Build Svelte UI and binary to $(BIN)"
|
||||
@echo " make docker - Build Docker image (DOCKER_IMAGE=$(DOCKER_IMAGE))"
|
||||
@echo " make test - Run all Go tests with timeout and shuffle"
|
||||
@@ -24,13 +23,6 @@ run: dev
|
||||
dev: build
|
||||
$(BIN) server --config $(CONFIG)
|
||||
|
||||
config:
|
||||
mkdir -p "$(dir $(CONFIG))"
|
||||
go run $(CMD_DIR) generate-config > "$(CONFIG)"
|
||||
@if [ ! -f "$(dir $(CONFIG))config.key" ]; then \
|
||||
go run $(CMD_DIR) generate-key > "$(dir $(CONFIG))config.key"; \
|
||||
fi
|
||||
|
||||
build: clean
|
||||
npm --prefix ./web/ui run build
|
||||
mkdir -p $(BIN_DIR)
|
||||
@@ -49,4 +41,6 @@ fmt:
|
||||
go fmt ./...
|
||||
|
||||
clean:
|
||||
rm -rf web/static
|
||||
rm -rf $(CONFIG)
|
||||
rm -rf $(BIN_DIR)
|
||||
|
||||
Reference in New Issue
Block a user