forked from mozilla-services/socorro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (45 loc) · 1.45 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
58
59
60
61
62
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
.PHONY: package
# Used by infra to build rpm
package:
./scripts/bootstrap.sh
./scripts/install.sh
./scripts/package.sh
# Docker related rules
.PHONY: dockerbuild dockersetup dockerclean dockertest dockertestshell dockerrun
DC := $(shell which docker-compose)
my.env:
@if [ ! -f my.env ]; \
then \
echo "Copying my.env.dist to my.env..."; \
cp docker/config/my.env.dist my.env; \
fi
.docker-build:
make dockerbuild
dockerbuild: my.env
${DC} build base
${DC} build webapp # crontabber is based off of the webapp image
${DC} build processor crontabber docs
touch .docker-build
# NOTE(willkg): We run setup in the webapp container because the webapp will own
# postgres going forward and has the needed environment variables.
dockersetup: my.env .docker-build
${DC} run webapp /app/docker/run_setup.sh
dockerclean:
rm .docker-build
dockertest: my.env
./docker/run_tests_in_docker.sh ${ARGS}
dockertestshell: my.env
./docker/run_tests_in_docker.sh --shell
dockerdocs: my.env
./docker/as_me.sh --container docs ./docker/run_build_docs.sh
dockerupdatedata: my.env
./docker/run_update_data.sh
dockerrun: my.env
${DC} up webapp processor
dockerstop: my.env
${DC} stop
dockerdependencycheck: my.env
${DC} run crontabber ./docker/run_dependency_checks.sh