-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (26 loc) · 1.42 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
BRANCH_NAME := 'main'
ifeq ($(wildcard docker-compose.prod.yml),)
DOCKER_COMPOSE_OVERRIDE:=docker-compose.dev.yml
else
DOCKER_COMPOSE_OVERRIDE:=docker-compose.prod.yml
endif
force-summary:
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} exec metadata_worker npx ts-node metadata_summary.ts -u amqp://rabbitmq
# Start/Stop container environment. This will run the scripts inside the built container, NOT the scripts in the local environment
start-workers:
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} up -d
stop-workers:
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} down
# stop container environment and remove all volumes and images. This is used by our ansible deployment script
shutdown-workers:
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} down -v --remove-orphans --rmi local
build-workers:
docker compose -f docker-compose.yml -f ${DOCKER_COMPOSE_OVERRIDE} build
# ====================== Dev Environment tasks
generate-dev-config:
if [ ! -f docker-compose.dev.yml ]; then cp docker-compose.dev.example.yml docker-compose.dev.yml; fi
# Start a rabbitmq instance that workers outside the environemnt can connect to
start-rabbitmq:
docker run -d --rm --name banner-screenshots-rabbitmq -p 5672:5672 rabbitmq
fetch-campaign-info:
curl -o campaign_info.toml -L https://raw.githubusercontent.com/wmde/fundraising-banners/${BRANCH_NAME}/campaign_info.toml