microblog.pub/Makefile

48 lines
1.7 KiB
Makefile
Raw Normal View History

PYTHON=python
2019-04-22 03:52:32 -05:00
SETUP_WIZARD_IMAGE=microblogpub-setup-wizard:latest
PWD=$(shell pwd)
# Build the config (will error if an existing config/me.yml is found) via a Docker container
2019-04-22 03:52:32 -05:00
.PHONY: config
config:
# Build the container for the setup wizard on-the-fly
cd setup_wizard && docker build . -t $(SETUP_WIZARD_IMAGE)
# Run and remove instantly
-docker run -e MICROBLOGPUB_WIZARD_PROJECT_NAME --rm -it --volume $(PWD):/app/out $(SETUP_WIZARD_IMAGE)
2019-04-22 03:52:32 -05:00
# Finally, remove the tagged image
docker rmi $(SETUP_WIZARD_IMAGE)
2018-06-01 13:29:44 -05:00
2019-04-22 04:18:06 -05:00
# Reload the federation test instances (for local dev)
2019-04-22 03:52:32 -05:00
.PHONY: reload-fed
2018-06-01 13:29:44 -05:00
reload-fed:
2018-07-12 17:45:29 -05:00
docker build . -t microblogpub:latest
2018-06-01 13:29:44 -05:00
docker-compose -p instance2 -f docker-compose-tests.yml stop
docker-compose -p instance1 -f docker-compose-tests.yml stop
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
2019-04-22 04:18:06 -05:00
# Reload the local dev instance
2019-04-22 03:52:32 -05:00
.PHONY: reload-dev
2018-07-14 05:14:08 -05:00
reload-dev:
2019-04-22 03:52:32 -05:00
docker build . -t microblogpub:latest
2018-07-14 05:14:08 -05:00
docker-compose -f docker-compose-dev.yml up -d --force-recreate
2019-04-22 04:18:06 -05:00
# Build the microblogpub Docker image
.PHONY: microblogpub
microblogpub:
# Update microblog.pub
2018-05-22 17:41:37 -05:00
git pull
2019-04-22 04:18:06 -05:00
# Rebuild the Docker image
2019-07-16 15:33:53 -05:00
docker build . --no-cache -t microblogpub:latest
2019-04-22 04:18:06 -05:00
# Run the docker-compose project locally (will perform a update if the project is already running)
.PHONY: run
2019-08-01 12:55:30 -05:00
run: microblogpub
2019-04-22 04:18:06 -05:00
# (poussetaches and microblogpub Docker image will updated)
# Update MongoDB
2019-08-14 17:28:55 -05:00
docker pull mongo:3
2019-08-01 12:55:30 -05:00
docker pull poussetaches/poussetaches
2019-04-22 04:18:06 -05:00
# Restart the project
2018-06-23 05:19:34 -05:00
docker-compose stop
2018-05-22 17:41:37 -05:00
docker-compose up -d --force-recreate --build