-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added deploy command, fixed gosec G115 (CWE-190), cleaned package.json
- Loading branch information
1 parent
0618dfe
commit 24497f5
Showing
7 changed files
with
544 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
REDIS_DB_ADDRESS = "localhost:6379" | ||
REDIS_DB_PASSWORD = "" | ||
REDIS_DB_INDEX = "0" | ||
DB_FILE_PATH = "./db" | ||
|
||
GIN_MODE = "debug" | ||
GIN_MODE = "release" | ||
DIST_PATH = "./dist" | ||
|
||
CONFIG_PATH = "./" | ||
CONFIG_TYPE = "json" | ||
CONFIG_PURPOSE = "prod" | ||
|
||
OPENWEATHER_API_KEY = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ BUILD_DIR := $(PROJECT_ROOT)/build | |
CURRENT_BUILD_DIR := $(BUILD_DIR)/$(BINARY_NAME) | ||
DIST_DIR := $(CURRENT_BUILD_DIR)/dist | ||
|
||
DEPLOY_HOST := razul-server.local | ||
DEPLOY_USER := goptivum | ||
DEPLOY_DIR := /home/$(DEPLOY_USER)/$(PROJECT_NAME) | ||
|
||
.PHONY: all | ||
all: build build-web-install | ||
|
||
|
@@ -33,11 +37,18 @@ build-web-install: | $(CURRENT_BUILD_DIR) | |
@mkdir -p $(DIST_DIR) | ||
@cp -r $(FRONTEND_SOURCE_DIR)/dist/* $(DIST_DIR) | ||
|
||
.PHONY: | ||
.PHONY: run | ||
run: | $(CURRENT_BUILD_DIR) | ||
@echo "Running the application..." | ||
@cd $(CURRENT_BUILD_DIR) && ./$(BINARY_NAME) | ||
|
||
.PHONY: deploy | ||
deploy: all | ||
@echo "Deploying to razul-server.local..." | ||
@rsync -avz --delete $(BUILD_DIR)/$(PROJECT_NAME)/ [email protected]:~/$(PROJECT_NAME) | ||
@ssh [email protected] 'sudo systemctl restart goptivum && sudo systemctl reload nginx' | ||
@echo "Deployment complete." | ||
|
||
$(CURRENT_BUILD_DIR): | ||
@mkdir -p $(CURRENT_BUILD_DIR) | ||
|
||
|
@@ -54,7 +65,6 @@ help: | |
@echo " make build-web Build the Vue.js frontend without installing NPM dependencies" | ||
@echo " make build-web-install Build the Vue.js frontend and install NPM dependencies" | ||
@echo " make run Run the application" | ||
@echo " make deploy Deploy the application to the remote server" | ||
@echo " make clean Clean up build files" | ||
@echo " make help Show this help message" | ||
|
||
.PHONY: build build-web build-web-install run clean help |
Oops, something went wrong.