forked from OpenSourcePolitics/matomo_pull
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (36 loc) · 915 Bytes
/
Makefile
File metadata and controls
45 lines (36 loc) · 915 Bytes
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
PORT := 8080
REGION := fr-par
REGISTRY_ENDPOINT := rg.$(REGION).scw.cloud
REGISTRY_NAMESPACE := funcscwmtmtestxx0tvv6o
NAME := matomo
IMAGE_NAME := $(REGISTRY_ENDPOINT)/$(REGISTRY_NAMESPACE)/$(NAME)
VERSION := latest
TAG := $(IMAGE_NAME):$(VERSION)
build:
docker build -t $(TAG) . --compress
start:
docker run -e JWT_SECRET_KEY=$(JWT_SECRET_KEY)\
-e POSTGRES_USER=$(POSTGRES_USER)\
-e POSTGRES_PASSWORD=$(POSTGRES_PASSWORD)\
-e POSTGRES_HOST=$(POSTGRES_HOST)\
-e POSTGRES_PORT=$(POSTGRES_PORT)\
-p $(PORT):$(PORT)\
${IMAGE_NAME}
stop:
docker ps --filter 'ancestor=$(IMAGE_NAME)' --format '{{.Names}}' | xargs docker stop
login:
docker login $(REGISTRY_ENDPOINT)/$(REGISTRY_NAMESPACE) -u nologin -p $(SCW_SECRET_TOKEN)
push:
docker push $(IMAGE_NAME)
deploy:
@make login
@make build
@make push
run:
@make build
@make start
restart:
@make stop
@make run
test:
curl localhost:$(PORT)