diff --git a/Makefile b/Makefile index 6cbab87..26c9d6e 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ SOURCES ?= cmd/*/*.go *.go # ----------------------------------------------------------------------------- # Runtime data +# Site host +APP_SITE ?= logbase.dev.lan + APP_LISTEN ?= :7070 PGHOST ?= db @@ -40,13 +43,18 @@ DC_VER ?= 1.23.2 # dcape containers name prefix DCAPE_PROJECT_NAME ?= dcape # dcape postgresql container name -DCAPE_DB ?= $(PRG)_db_1 +DCAPE_DB ?= $(DCAPE_PROJECT_NAME)_db_1 +# dcape network attach to +DCAPE_NET ?= $(DCAPE_PROJECT_NAME)_default define CONFIG_DEFAULT # ------------------------------------------------------------------------------ # application config file, generated by make $(CFG) +# Site host +APP_SITE=$(APP_SITE) + # App/Docker listen addr APP_LISTEN=$(APP_LISTEN) @@ -68,6 +76,11 @@ PGPASSWORD=$(PGPASSWORD) # App name PGAPPNAME=$(PGAPPNAME) +# dcape network attach to +DCAPE_NET=$(DCAPE_NET) +# dcape postgresql container name +DCAPE_DB=$(DCAPE_DB) + endef export CONFIG_DEFAULT diff --git a/docker-compose.yml b/docker-compose.yml index 854bd6e..4c61bb5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,9 @@ services: image: ${APP_IMAGE} command: --listen=:7070 --path=/data + labels: + - "traefik.enable=true" + - "traefik.frontend.rule=Host:${APP_SITE}" environment: - PGHOST=db - PGPORT=5432