-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
57 lines (38 loc) · 1.69 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
54
55
56
57
whoami := $(shell whoami)
migration-up:
docker-compose run --rm --no-deps web \
npm run migrate
migration-down:
docker-compose run --rm --no-deps web ./node_modules/.bin/pg-migrate down
migration-create:
docker-compose run --rm --no-deps web ./node_modules/.bin/pg-migrate create $(name) && sudo chown -R ${whoami}:${whoami} migrations
install:
docker-compose run --rm --no-deps web npm install
npm-install-dep:
docker-compose run --rm --no-deps web npm install --save $(package) && sudo chown -R ${whoami}:${whoami} package.json
npm-install-devDep:
docker-compose run --rm --no-deps web npm install --save-dev $(package) && sudo chown -R ${whoami}:${whoami} package.json
npm-update-dep:
docker-compose run --rm --no-deps web npm update --save $(package) && sudo chown -R ${whoami}:${whoami} package.json
npm-update-devDep:
docker-compose run --rm --no-deps web npm update --save-dev $(package) && sudo chown -R ${whoami}:${whoami} package.json
build:
docker build -t kannaj/42exp .
push: build
docker push kannaj/42exp
tests:
docker-compose -f docker-compose.test.yml up
development:
docker-compose up
production:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
rebuild-web:
docker-compose stop web && docker-compose rm -f web && docker-compose -f docker-compose.prod.yml up --no-deps --build -d web
ansible-install:
ansible-galaxy install -r devops/requirements.yml -p devops/roles
ansible-provision:
ansible-playbook devops/provisioning.yml -i devops/hosts/ --ask-become-pass
ansible-start:
ansible-playbook devops/start-application.yml -i devops/hosts/ --ask-become-pass
ansible-deploy: push
ansible-playbook devops/deploy.yml -i devops/hosts/ --ask-become-pass