-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
81 lines (66 loc) · 2.43 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# app custom Makefile
# Docker repo & image name without version
IMAGE ?= registry.gitlab.com/commento/commento
# Docker image version
IMAGE_VER ?= latest
# Hostname for external access
APP_SITE ?= comm.dev.lan
# App names (db/user name etc)
APP_NAME ?= commento
# Enable DB usage:
# * Add DB config part to .env.sample
# * Enable db* targets
# * make db-create inside .drone-default target
USE_DB ?= yes
# ------------------------------------------------------------------------------
# app custom config
DCAPE_ROOT ?= /opt/dcape/var
# Set the SMTP credentials
COMMENTO_SMTP_HOST ?= smtp.gmail.com
COMMENTO_SMTP_PORT ?= 587
COMMENTO_SMTP_USERNAME ?= [email protected]
COMMENTO_SMTP_PASSWORD ?= hunter2
COMMENTO_SMTP_FROM_ADDRESS ?= [email protected]
COMMENTO_GOOGLE_KEY ?=
COMMENTO_GOOGLE_SECRET ?=
COMMENTO_GITHUB_KEY ?=
COMMENTO_GITHUB_SECRET ?=
COMMENTO_GITLAB_KEY ?=
COMMENTO_GITLAB_SECRET ?=
# ------------------------------------------------------------------------------
# .env template (custom part)
# inserted in .env.sample via 'make config'
define CONFIG_CUSTOM
# ------------------------------------------------------------------------------
# app custom config, generated by make config
# db:$(USE_DB) user:$(ADD_USER)
# Path to /opt/dcape/var. Used only outside drone
#DCAPE_ROOT=$(DCAPE_ROOT)
# Set the SMTP credentials
COMMENTO_SMTP_HOST=${COMMENTO_SMTP_HOST}
COMMENTO_SMTP_PORT=${COMMENTO_SMTP_PORT}
COMMENTO_SMTP_USERNAME=${COMMENTO_SMTP_USERNAME}
COMMENTO_SMTP_PASSWORD=${COMMENTO_SMTP_PASSWORD}
COMMENTO_SMTP_FROM_ADDRESS=${COMMENTO_SMTP_FROM_ADDRESS}
# Set Google OAuth credentials
COMMENTO_GOOGLE_KEY=${COMMENTO_GOOGLE_KEY}
COMMENTO_GOOGLE_SECRET=${COMMENTO_GOOGLE_SECRET}
# Set GitHub OAuth credentials
COMMENTO_GITHUB_KEY=${COMMENTO_GITHUB_KEY}
COMMENTO_GITHUB_SECRET=${COMMENTO_GITHUB_SECRET}
# Set GitLab OAuth credentials
COMMENTO_GITLAB_KEY=${COMMENTO_GITLAB_KEY}
COMMENTO_GITLAB_SECRET=${COMMENTO_GITLAB_SECRET}
endef
# ------------------------------------------------------------------------------
# Find and include DCAPE/apps/drone/dcape-app/Makefile
DCAPE_COMPOSE ?= dcape-compose
DCAPE_MAKEFILE ?= $(shell docker inspect -f "{{.Config.Labels.dcape_app_makefile}}" $(DCAPE_COMPOSE))
ifeq ($(shell test -e $(DCAPE_MAKEFILE) && echo -n yes),yes)
include $(DCAPE_MAKEFILE)
else
include /opt/dcape-app/Makefile
endif
# -----------------------------------------------------------------------------
## Custom app targets
#: