Improve the Makefile
This commit is contained in:
parent
1f96f0588c
commit
1a66837f0d
1 changed files with 21 additions and 6 deletions
27
Makefile
27
Makefile
|
@ -2,6 +2,7 @@ PYTHON=python
|
||||||
SETUP_WIZARD_IMAGE=microblogpub-setup-wizard:latest
|
SETUP_WIZARD_IMAGE=microblogpub-setup-wizard:latest
|
||||||
PWD=$(shell pwd)
|
PWD=$(shell pwd)
|
||||||
|
|
||||||
|
# Build the config (will error if an existing config is found) via a Docker container
|
||||||
.PHONY: config
|
.PHONY: config
|
||||||
config:
|
config:
|
||||||
# Build the container for the setup wizard on-the-fly
|
# Build the container for the setup wizard on-the-fly
|
||||||
|
@ -11,6 +12,7 @@ config:
|
||||||
# Finally, remove the tagged image
|
# Finally, remove the tagged image
|
||||||
docker rmi $(SETUP_WIZARD_IMAGE)
|
docker rmi $(SETUP_WIZARD_IMAGE)
|
||||||
|
|
||||||
|
# Reload the federation test instances (for local dev)
|
||||||
.PHONY: reload-fed
|
.PHONY: reload-fed
|
||||||
reload-fed:
|
reload-fed:
|
||||||
docker build . -t microblogpub:latest
|
docker build . -t microblogpub:latest
|
||||||
|
@ -19,18 +21,31 @@ reload-fed:
|
||||||
WEB_PORT=5006 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d --force-recreate --build
|
WEB_PORT=5006 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d --force-recreate --build
|
||||||
WEB_PORT=5007 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d --force-recreate --build
|
WEB_PORT=5007 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d --force-recreate --build
|
||||||
|
|
||||||
.PHONY: poussetaches
|
# Reload the local dev instance
|
||||||
poussetaches:
|
|
||||||
git clone https://github.com/tsileo/poussetaches.git pt && cd pt && docker build . -t poussetaches:latest && cd - && rm -rf pt
|
|
||||||
|
|
||||||
.PHONY: reload-dev
|
.PHONY: reload-dev
|
||||||
reload-dev:
|
reload-dev:
|
||||||
docker build . -t microblogpub:latest
|
docker build . -t microblogpub:latest
|
||||||
docker-compose -f docker-compose-dev.yml up -d --force-recreate
|
docker-compose -f docker-compose-dev.yml up -d --force-recreate
|
||||||
|
|
||||||
.PHONY: run
|
# Build the poussetaches Docker image
|
||||||
run:
|
.PHONY: poussetaches
|
||||||
|
poussetaches:
|
||||||
|
git clone https://github.com/tsileo/poussetaches.git pt && cd pt && docker build . -t poussetaches:latest && cd - && rm -rf pt
|
||||||
|
|
||||||
|
# Build the microblogpub Docker image
|
||||||
|
.PHONY: microblogpub
|
||||||
|
microblogpub:
|
||||||
|
# Update microblog.pub
|
||||||
git pull
|
git pull
|
||||||
|
# Rebuild the Docker image
|
||||||
docker build . -t microblogpub:latest
|
docker build . -t microblogpub:latest
|
||||||
|
|
||||||
|
# Run the docker-compose project locally (will perform a update if the project is already running)
|
||||||
|
.PHONY: run
|
||||||
|
run: poussetaches microblogpub
|
||||||
|
# (poussetaches and microblogpub Docker image will updated)
|
||||||
|
# Update MongoDB
|
||||||
|
docker pull mongo
|
||||||
|
# Restart the project
|
||||||
docker-compose stop
|
docker-compose stop
|
||||||
docker-compose up -d --force-recreate --build
|
docker-compose up -d --force-recreate --build
|
||||||
|
|
Loading…
Reference in a new issue