aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2022-09-09 06:56:32 -0400
committerGravatar GitHub <noreply@github.com> 2022-09-09 12:56:32 +0200
commitadf1c3bd9a2feb02227b5468bc0559deb34b60bf (patch)
tree7fefdf98b3ab7370344d44a40b159643fa7abcec
parentfea12a0957c5156b8d4ce3f329aa20a819a1e316 (diff)
Add freshrss network when creating container (#4592)
This will ease the connection between freshrss container and other containers.
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7777bdfc1..6216dfcec 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ ifndef TAG
endif
PORT ?= 8080
+NETWORK ?= freshrss-network
ifdef NO_DOCKER
PHP = $(shell which php)
@@ -38,6 +39,7 @@ build: ## Build a Docker image
.PHONY: start
start: ## Start the development environment (use Docker)
+ docker network create --driver bridge $(NETWORK) || true
$(foreach extension,$(extensions),$(eval volumes=$(volumes) --volume $(extension):/var/www/FreshRSS/extensions/$(notdir $(extension)):z))
docker run \
--rm \
@@ -46,11 +48,13 @@ start: ## Start the development environment (use Docker)
--publish $(PORT):80 \
--env FRESHRSS_ENV=development \
--name freshrss-dev \
+ --network $(NETWORK) \
freshrss/freshrss:$(TAG)
.PHONY: stop
stop: ## Stop FreshRSS container if any
- docker stop freshrss-dev
+ docker stop freshrss-dev || true
+ docker network rm $(NETWORK) || true
######################
## Tests and linter ##