forked from publiclab/mapknitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (25 loc) · 823 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
export COMPOSE_HTTP_TIMEOUT=360
export COMPOSE_PROJECT_NAME
export PORT
define wait_for_container
@while ! docker-compose logs web | grep "web server started"; do\
echo "Serving Mapknitter";\
sleep 10;\
done;
endef
build:
cp config/database.yml.example config/database.yml
cp config/config.yml.example config/config.yml
cp config/initializers/recaptcha.rb.example config/initializers/recaptcha.rb
cp db/schema.rb.example db/schema.rb
docker-compose down --remove-orphans
docker-compose build
deploy-container:
docker-compose up -d
$(call wait_for_container)
redeploy-container:
docker-compose down --remove-orphans
docker-compose up --force-recreate -d
$(call wait_for_container)
docker-compose run -e "DISABLE_DATABASE_ENVIRONMENT_CHECK=1" --rm web bash -lc \
"bundle exec rails db:migrate"