-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
33 lines (27 loc) · 1.38 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
OSPC_ANACONDA_TOKEN := `cat ~/.ospc_anaconda_token`
NEW_RELIC_TOKEN := `cat ~/.newrelic-$(MODE)`
dist-build:
cd distributed && \
docker build -t distributed:$(TAG) ./ --build-arg PUF_TOKEN=$(OSPC_ANACONDA_TOKEN) && \
docker build --no-cache --build-arg TAG=$(TAG) -t flask:$(TAG) --file Dockerfile.flask ./ && \
docker build --no-cache --build-arg TAG=$(TAG) -t celery:$(TAG) --file Dockerfile.celery ./
dist-push:
cd distributed && \
docker tag distributed:$(TAG) $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/distributed:$(TAG) && \
docker tag flask:$(TAG) $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/flask:$(TAG) && \
docker tag celery:$(TAG) $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/celery:$(TAG) && \
docker push $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/distributed:$(TAG) && \
docker push $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/flask:$(TAG) && \
docker push $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com/celery:$(TAG)
dist-test:
cd distributed && \
docker-compose rm -f && \
docker-compose run flask py.test -s -v && \
docker-compose rm -f
webapp-build:
docker build --build-arg NEW_RELIC_TOKEN=$(NEW_RELIC_TOKEN) -t web:$(TAG) ./
webapp-push:
docker tag web:$(TAG) registry.heroku.com/ospc-$(MODE)/web
docker push registry.heroku.com/ospc-$(MODE)/web
webapp-release:
heroku container:release web -a ospc-$(MODE)