generated from OpenSourcePolitics/decidim-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (31 loc) · 876 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
# Starts with production configuration
local-prod:
docker-compose up -d
# Starts with development configuration
# TODO: Fix seeds for local-dev make command
local-dev:
docker-compose -f docker-compose.dev.yml up -d
@make create-database
@make run-migrations
#@make create-seeds
# Stops containers and remove volumes
teardown:
docker-compose down -v --rmi all
# Starts containers and restore dump
local-restore:
@make create-database
@make -i restore-dump
@make run-migrations
@make start
# Create database
create-database:
docker-compose run app bundle exec rails db:create
# Run migrations
run-migrations:
docker-compose run app bundle exec rails db:migrate
# Create seeds
create-seeds:
docker-compose exec -e RAILS_ENV=development app /bin/bash -c '/usr/local/bundle/bin/bundle exec rake db:seed'
# Restore dump
restore-dump:
bundle exec rake restore_dump