Skip to content

Instantly share code, notes, and snippets.

@Pierstoval Pierstoval/Makefile
Last active Apr 2, 2019

Embed
What would you like to do?
RequestTracker bootstraping makefile

Request-Tracker makefile

Contains the following commands to set up a Request-Tracker website based on the Docker image, and storing data in the host.

help                 Show this help message
restart              Restarts RequestTracker
start                Starts RequestTracker on port 62485
stop                 Stops currently running RequestTracker container
cli                  Connects to the container with bash
build                Creates var/ and etc/ dir for persistent storage and config, and downloads the docker image

⚠️ Remember that you must set the REQUEST_TRACKER_DIR environment variable to determine which directory will be used for Request Tracker's var/ and etc/ directories.

Install

  • Just save this makefile in an empty directory that will store the data of your Request-Tracker project.
  • Make your nginx configuration proxy to the specified port 62485 for the requests.
  • Remember that you will have to update the etc/RT_Config.pm and etc/RT_SiteConfig.pm configuration files to set up your domain name/host, web port, and make sure Request-Tracker accepts your reverse proxy.
  • Done, just enjoy!
RTDIR = ${REQUEST_TRACKER_DIR}
echo:
@echo "${WOW}"
##
## RequestTracker
## --------------
##
.DEFAULT_GOAL := help
help: ## Show this help message
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-20s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
restart: ## Restarts RequestTracker
restart: stop start
start: ## Starts RequestTracker on port 62485
start:
@echo "Starting on port 62485"
@docker run -d --rm --name rt -v "${RTDIR}/etc:/opt/rt4/var" -v "${RTDIR}/etc:/opt/rt4/etc" -p 62485:80 netsandbox/request-tracker
stop: ## Stops currently running RequestTracker container
stop:
@echo "Stopping server"
@docker stop rt
cli: ## Connects to the container with bash
cli:
@docker exec -it rt bash
build: ## Creates var/ and etc/ dir for persistent storage and config, and downloads the docker image
build:
@mkdir -p var/data/RT-Shredder etc/
@sudo chown -R www-data:www-data var/ etc/
@docker pull netsandbox/request-tracker
.PHONY: help start stop restart cli build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.