-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (33 loc) · 930 Bytes
/
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
ENV ?= tokenizer.local
logs:
docker-compose -f config/${ENV}/main.yml logs --tail 100 -f -t
stop:
docker-compose -f config/${ENV}/main.yml stop
start:
docker-compose -f config/${ENV}/main.yml up -d \
--force-recreate \
--remove-orphans
while true; do \
docker exec postgres.${ENV} psql tokenizer user -c 'SELECT * FROM pg_settings LIMIT 1' >/dev/null 2>&1; \
if [ $${?} = 0 ] ; then \
break; \
fi; \
echo -n . ; \
sleep 1; \
done
build:
docker-compose -f config/${ENV}/main.yml build
ps:
docker-compose -f config/${ENV}/main.yml ps
migrate:
docker exec -i postgres.${ENV} psql tokenizer user < db/schema.sql
seed:
docker exec -i postgres.${ENV} psql tokenizer user < db/seed.sql
up:
make build
make start
make migrate
make seed
# ====================
# Приложение запущено!
# ====================