-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (36 loc) · 1.42 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.ONESHELL:
SHELL=/bin/bash
.PHONY: build
config ?= .env
# Überprüfen und erstellen der .env-Datei, falls sie nicht existiert
$(shell [ -f $(config) ] || cp .env.example $(config))
include $(config)
export $(shell sed 's/=.*//' $(config))
# Note that the extra activate is needed to ensure that the activate floats env to the front of PATH
CONDA_ACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate; conda activate
GIT_COMMIT := $(shell git rev-parse --short HEAD)
initiate-dev:
@if [ ! -d ./.venv ]; then \
conda env create -f environment.yaml -p ./.venv; \
fi
[ -f providers.yaml ] || cp providers.yaml.example providers.yaml
[ -f .env ] || cp .env.example .env
build-image:
@echo 'Building release ${CONTAINER_REGISTRY}/analytics/$(IMAGE_NAME):$(IMAGE_TAG)'
# build your image
docker compose -f docker-compose-build.yaml build --build-arg SOURCE_COMMIT=$(GIT_COMMIT) app
upload-image: build-image
docker compose -f docker-compose-build.yaml push app
start-dev: stop-dev
docker compose -f docker-compose-dev.yaml up geoserver postgis -d
flask -A src/ump/main.py --debug run
start-dev-with-modelserver: stop-dev
docker compose -f docker-compose-dev.yaml up geoserver postgis modelserver -d
flask -A src/ump/main.py --debug run
restart-dev: stop-dev start-dev
stop-dev:
docker compose -f docker-compose-dev.yaml down
build-docs:
jupyter-book build docs
clean-docs:
jupyter-book clean docs