generated from OpenSourcePolitics/decidim-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (36 loc) · 1.42 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
run: up
@make create-seeds
up:
docker build . -f Dockerfile.local -t decidim-app-app:latest
docker build . -f Dockerfile.local -t decidim-app-sidekiq:latest
docker-compose -f docker-compose.local.yml up -d
@make setup-database
# Stops containers and remove volumes
teardown:
docker-compose -f docker-compose.local.yml down -v --rmi all
create-database:
docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create'
setup-database: create-database
docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate'
# Create seeds
create-seeds:
docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed'
# Restore dump
restore-dump:
bundle exec rake restore_dump
shell:
docker-compose -f docker-compose.local.yml exec app /bin/bash
restart:
docker-compose -f docker-compose.local.yml up -d
status:
docker-compose -f docker-compose.local.yml ps
logs:
docker-compose -f docker-compose.local.yml logs app
rebuild:
docker-compose -f docker-compose.local.yml up --build -d
# Git utils
prepare-commit:
bundle exec erblint -la -a
bundle exec rubocop -A
bundle exec i18n-tasks normalize --locales en,fr
bundle exec i18n-tasks unused --locales en,fr