-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
53 lines (40 loc) · 1.61 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: help ps build up down restart shell shell-root shell-ipython shell-db clean-cache
SHELL=/bin/bash
help:
@echo 'make ps list containers.'
@echo 'make build build an image from a Dockerfile.'
@echo 'make push push an image to a registry.'
@echo 'make up build, (re)create, start, and attach to containers for a service.'
@echo 'make down stop and remove containers, networks, volumes, and images created by up.'
@echo 'make restart restart all stopped and running services.'
@echo 'make shell connect to webserver container in new bash shell.'
@echo 'make shell-root connect to webserver container in new bash shell as root.'
@echo 'make shell-ipython connect to webserver container in new bash shell.'
@echo 'make shell-db shell into psql inside postgres container.'
@echo 'make clean-cache remove python cache files from tree.'
ps: docker-ps
build: docker-build
push: docker-push
up: docker-up
down: docker-down
restart: docker-down docker-up
docker-ps:
docker-compose ps
docker-build:
docker build --pull --file=Dockerfile --tag=${REGISTRY_PATH}:${IMAGE_TAG} .
docker-push:
docker push ${REGISTRY_PATH}:${IMAGE_TAG}
docker-up:
docker-compose up -d --build
docker-down:
docker-compose down
shell:
docker-compose exec -u airflow webserver bash
shell-root:
docker-compose exec -u root webserver bash
shell-ipython:
docker-compose exec -u airflow webserver ipython
shell-db:
docker-compose exec postgres psql -w --username "airflow" --dbname "airflow"
clean-cache:
find . -name '*.py[cod]' -exec rm --force {} +