Skip to content

Commit

Permalink
added makefile and docker ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mdiener21 committed Nov 8, 2021
1 parent 06fbf85 commit 902e06b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Dockerfile
devops
tests
.gitlab-ci.yml
README.md

node_modules
npm-debug*
.nuxt
33 changes: 15 additions & 18 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 902e06b

Please sign in to comment.