Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some docker image config #35

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add some docker image config
  • Loading branch information
Maxim Danilin committed Aug 1, 2023
commit 83b1a6849d921798e1008b8d068b480edf4f1607
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ APPS ?= traefik portainer enfist cis

# Postgresql Database image
PG_IMAGE ?= postgres:12.1-alpine
# Postgresql container hostname
PG_HOSTNAME ?= db
# Postgresql Database superuser password
PG_DB_PASS ?= $(shell < /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head -c14; echo)
# Postgresql Database encoding
Expand All @@ -27,6 +29,8 @@ PG_PORT_LOCAL ?= 5433
PG_SOURCE_SUFFIX ?=
# shared memory
PG_SHM_SIZE ?= 64mb
# initdbargs for customise create postgres cluster
INITDB_ARGS ?= --lc-message=C

# Docker-compose image tag
DC_VER ?= 1.23.2
Expand Down Expand Up @@ -56,6 +60,8 @@ TZ=$(TZ)

# Postgresql Database image
PG_IMAGE=$(PG_IMAGE)
# Postgresql container hostname
PG_HOSTNAME=$(PG_HOSTNAME)
# Postgresql Database superuser password
PG_DB_PASS=$(PG_DB_PASS)
# Postgresql Database encoding
Expand All @@ -64,6 +70,8 @@ PG_ENCODING=$(PG_ENCODING)
PG_PORT_LOCAL=$(PG_PORT_LOCAL)
# shared memory
PG_SHM_SIZE=$(PG_SHM_SIZE)
# initdbargs for customise create postgres cluster
INITDB_ARGS=$(INITDB_ARGS)

endef
export CONFIG_DEF
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ make init PG_PORT_LOCAL=5434
```

После выполнения `init`, надо отредактировать файл `.env`, изменив дефолтные настройки на необходимые.
При изменении версий приложений, отличных от значений по-умолчанию, будет отображаться предупреждение о не соответствии значений. Установка версий образов приложений, отличных от рекомендуемых, может привести к нарушению работы приложения и сервиса в целом.
Также будет создан каталог `var/` для файлов, необходимых для запуска приложений.
Персистентные данные приложений размещаются в `var/data/`, журналы - в `var/log/`.

Expand Down
30 changes: 26 additions & 4 deletions apps/cis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,30 @@ SHELL = /bin/bash

# DCAPE_USED==1 when called from upper Makefile
DCAPE_USED ?= 0
# Webtail Docker image
CIS_WEBTAIL_IMAGE ?= lekovr/webtail
# Webtail Docker image version by dcape
CIS_WEBTAIL_VER0 ?= 0.34
CIS_WEBTAIL_VER0 ?= 0.43.1
# Webtail Docker image version
CIS_WEBTAIL_VER ?= $(CIS_WEBTAIL_VER0)
# Webhook Docker image
CIS_WEBHOOK_IMAGE ?= dopos/webhook
# Webhook Docker image version by dcape
CIS_WEBHOOK_VER0 ?= 0.10
# Webtail Docker image version
# Webhook Docker image version
CIS_WEBHOOK_VER ?= $(CIS_WEBHOOK_VER0)
# Narra Docker image
CIS_NARRA_IMAGE ?= dopos/narra
# Narra Docker image version by dcape
CIS_NARRA_VER0 ?= 0.3
# Webtail Docker image version
# Narra Docker image version
CIS_NARRA_VER ?= $(CIS_NARRA_VER0)
# Traefik-fl Docker image
CIS_TRAEFIK_FL_IMAGE ?= dopos/traefik-fl
# Traefik-fl Docker image version by dcape
CIS_TRAEFIK_FL_VER0 ?= 0.2
# Traefik-fl Docker image version
CIS_TRAEFIK_FL_VER ?= $(CIS_TRAEFIK_FL_VER0)
# CIS hostname prefix
CIS_HOST_PREFIX ?= cis
# CIS hostname
Expand Down Expand Up @@ -54,12 +66,22 @@ CIS_CRYPT_KEY=$(CIS_CRYPT_KEY)
# Webhook access password
CIS_DEPLOY_PASS=$(CIS_DEPLOY_PASS)

# Webtail Docker image
CIS_WEBTAIL_IMAGE=$(CIS_WEBTAIL_IMAGE)
# Webtail Docker image version
CIS_WEBTAIL_VER=$(CIS_WEBTAIL_VER)
# Webhook Docker image version
# Webhook Docker image
CIS_WEBHOOK_IMAGE=$(CIS_WEBHOOK_IMAGE)
# Webhook image version
CIS_WEBHOOK_VER=$(CIS_WEBHOOK_VER)
# Narra Docker image
CIS_NARRA_IMAGE=$(CIS_NARRA_IMAGE)
# Narra Docker image version
CIS_NARRA_VER=$(CIS_NARRA_VER)
# Traefik-fl Docker image
CIS_TRAEFIK_FL_IMAGE=$(CIS_TRAEFIK_FL_IMAGE)
# Traefik-fl Docker image version
CIS_TRAEFIK_FL_VER=$(CIS_TRAEFIK_FL_VER)

# CIS webhook must have same root as dcape
DCAPE_ROOT=$(DCAPE_ROOT)
Expand Down
8 changes: 4 additions & 4 deletions apps/cis/docker-compose.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# ------------------------------------------------------------------------------
webtail:
image: lekovr/webtail:${CIS_WEBTAIL_VER}
image: ${CIS_WEBTAIL_IMAGE}:${CIS_WEBTAIL_VER}
restart: always
labels:
- "traefik.enable=false"
Expand All @@ -36,7 +36,7 @@

# ------------------------------------------------------------------------------
webhook:
image: dopos/webhook:${CIS_WEBHOOK_VER}
image: ${CIS_WEBHOOK_IMAGE}:${CIS_WEBHOOK_VER}
restart: always
labels:
- "traefik.enable=false"
Expand All @@ -56,14 +56,14 @@

# ------------------------------------------------------------------------------
traefik-fl:
image: dopos/traefik-fl:0.2
image: ${CIS_TRAEFIK_FL_IMAGE}:${CIS_TRAEFIK_FL_VER}
restart: always
labels:
- "traefik.enable=false"

# ------------------------------------------------------------------------------
narra:
image: dopos/narra:${CIS_NARRA_VER}
image: ${CIS_NARRA_IMAGE}:${CIS_NARRA_VER}
restart: always
labels:
- "traefik.enable=false"
Expand Down
4 changes: 4 additions & 0 deletions apps/enfist/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ DCAPE_USED ?= 0
ENFIST_DB_TAG ?= enfist
# Database user password
ENFIST_DB_PASS ?= $(shell < /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head -c14; echo)
# app-enfist docker image
ENFIST_DOCKER_IMAGE ?= apisite/enfist
# apisite/app-enfist docker image version by dcape
ENFIST_VER0 ?= 0.6.2
# apisite/app-enfist docker image version
Expand All @@ -25,6 +27,8 @@ ENFIST_DB_TAG=$(ENFIST_DB_TAG)
# Database user password
ENFIST_DB_PASS=$(ENFIST_DB_PASS)

# app-enfist docker image
ENFIST_DOCKER_IMAGE=$(ENFIST_DOCKER_IMAGE)
# apisite/app-enfist docker image version
ENFIST_VER=$(ENFIST_VER)

Expand Down
2 changes: 1 addition & 1 deletion apps/enfist/docker-compose.inc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ------------------------------------------------------------------------------
enfist:
image: apisite/enfist:${ENFIST_VER}
image: ${ENFIST_DOCKER_IMAGE}:${ENFIST_VER}
restart: always
depends_on:
db:
Expand Down
20 changes: 17 additions & 3 deletions apps/gitea/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ SHELL = /bin/bash

# DCAPE_USED==1 when called from upper Makefile
DCAPE_USED ?= 0
# Gitea Docker image version by dcape
# Gitea image name by Dcape
GITEA_IMAGE0 ?= gitea/gitea
# Gitea image version by Dcape
GITEA_VER0 ?= 1.10.0
# Gitea Docker image version
# Gitea image name
GITEA_IMAGE ?= $(GITEA_IMAGE0)
# Gitea image version
GITEA_VER ?= $(GITEA_VER0)
# Database name and database user name
GITEA_DB_TAG ?= gitea
Expand All @@ -27,7 +31,10 @@ define CONFIG_GITEA
# ------------------------------------------------------------------------------
# Gitea settings

# Gitea Docker image version
# Gitea image name
GITEA_IMAGE=$(GITEA_IMAGE)

# Gitea image version
GITEA_VER=$(GITEA_VER)

# App hostname
Expand Down Expand Up @@ -73,10 +80,17 @@ gitea-init:
echo "$$CONFIG_GITEA" >> .env ; \
echo "** GITEA DB PASSWORD: $(GITEA_DB_PASS)" ; \
}

@if [[ "$$GITEA_VER0" != "$$GITEA_VER" ]] ; then \
echo "Warning: GITEA_VER in dcape ($$GITEA_VER0) differs from yours ($$GITEA_VER)" ; \
fi

@if [[ "$$GITEA_IMAGE0" != "$$GITEA_IMAGE" ]] ; then \
echo "Warning: GITEA_IMAGE in dcape ($$GITEA_IMAGE0) differs from yours ($$GITEA_IMAGE)" ; \
fi



gitea-apply:
@$(MAKE) -s db-create NAME=GITEA
@[ -d $$GITEA_INI_DIR ] || mkdir -p $$GITEA_INI_DIR
Expand Down
2 changes: 1 addition & 1 deletion apps/gitea/docker-compose.inc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ------------------------------------------------------------------------------
gitea:
image: gitea/gitea:${GITEA_VER}
image: ${GITEA_IMAGE}:${GITEA_VER}
ports:
- "${GITEA_SSH_PORT}:22"
volumes:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
# ------------------------------------------------------------------------------
db:
image: ${PG_IMAGE}
hostname: ${PG_HOSTNAME}
volumes:
- ./var/data/db:/var/lib/postgresql/data
- ./var/data/db-backup:/opt/backup
Expand All @@ -22,6 +23,7 @@ services:
- POSTGRES_PASSWORD=${PG_DB_PASS}
- TZ=${TZ}
- LANG=${PG_ENCODING}
- POSTGRES_INITDB_ARGS=${INITDB_ARGS}
- DCAPE_DB_DUMP_DEST=/opt/backup
restart: unless-stopped
labels:
Expand Down