generated from OpenSourcePolitics/decidim-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 1.13 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
run: up
@make create-seeds
up:
docker-compose -f docker-compose.local.yml up --build -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
rebuild:
docker-compose -f docker-compose.local.yml up --build -d
status:
docker-compose -f docker-compose.local.yml ps
logs:
docker-compose -f docker-compose.local.yml logs app