diff --git a/.dockerignore b/.dockerignore index 19d40154..b76f8cf1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,7 @@ Dockerfile -devops tests .gitlab-ci.yml README.md - +node_modules +npm-debug* +.nuxt diff --git a/.env-sample b/.env-sample index 120a38e7..5e9a2b7a 100644 --- a/.env-sample +++ b/.env-sample @@ -1,24 +1,21 @@ -# --App configurations-- # - -BASE_URL=https://tuw-maps.tuwien.ac.at -BASE_API_URL=https://tuw-maps.tuwien.ac.at/api/v1/ -BASE_WMS_URL=https://tuw-maps.tuwien.ac.at/geoserver/wms -SEARCH_URL=https://tuw-maps.tuwien.ac.at/api/v1/search -HOME_PAGE_URL=https://tuwien.at -DEFAULT_CENTER_XY=[1823820.8003225543, 6138685.150457315] -TOKEN='Token 123abc' -LAYER_NAME_PREFIX=floor_ -GEO_SERVER_LAYER_PREFIX=indrztu: -DEFAULT_START_FLOOR=eg - -#optional sentry error logging -#SENTRY_DSN='https://yourSentryUniqueUrlGoesHere' +BASE_URL=http://localhost:8000 +BASE_API_URL=http://localhost:8000/api/v1/ +BASE_WMS_URL=https://localhost:8000/geoserver/wms +SEARCH_URL=http://localhost:8000/api/v1/search +HOME_PAGE_URL=https://example.com +DEFAULT_CENTER_XY=[1826437.70, 6142677.25] +TOKEN='Token 123456' +LAYER_NAME_PREFIX= +GEO_SERVER_LAYER_PREFIX='indrz:' +DEFAULT_START_FLOOR=0 +SENTRY_DSN= +TITLE='my uni' # --Style configuration-- # -FONT_FAMILY=Roboto +FONT_FAMILY="Quattrocento Sans" FONT_SIZE=16 ICON_SET=mdi -LOGO_FILE=/images/tu-logo.png -LOGO_ENABLED=true +LOGO_FILE=/images/uni-logo.png +LOGO_ENABLED=false FAVICON_ICON=/favicon.ico diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..b3314cf0 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +SHELL=/bin/bash +PWD ?= pwd_unknown +PROJECT_NAME=indrz-backend-wu +COMPOSE_IGNORE_ORPHANS=True +DOCKER_IMAGE=indrz_web +BACKEND_NET=indrz-backend-wu_indrz-net + +# cnf ?= indrz/settings/.env +# include $(cnf) +# export $(shell sed 's/=.*//' $(cnf)) + +.PHONY: help + +help: ## This help. + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +.DEFAULT_GOAL := help + +build-web: ## Build indrz_web Docker Image + docker build -t indrz/web:latest . -f devops/docker/nginx/Dockerfile + +run: ## Run Front-end (production-ready) + @docker run -d \ + -p 80:80 -p 443:443 \ + -v indrz-backend-wu_indrz-static:/opt/data/static \ + -v indrz-backend-wu_indrz-media:/opt/data/media \ + --network ${BACKEND_NET} \ + --name ${DOCKER_IMAGE} \ + --restart always \ + indrz/web:latest + + +pull: ## Pull source code from Git + git pull + +# deploy: pull migrate collectstatic run ## Update and deploy Indrz application +# docker restart indrz + +generate-dist: ## generate dist folder ie compiled version of Frontend + git rm -r dist + rm -rf dist + yarn run generate + git add dist + git commit -m "updated dist" dist + +stop: ## Stop Indrz Docker project + docker stop ${DOCKER_IMAGE} && docker rm ${DOCKER_IMAGE}