Skip to content

Commit a403a95

Browse files
committed
add makefile
1 parent 4a41735 commit a403a95

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Diff for: Makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
docker:
2+
@docker-compose build
3+
@docker-compose up -d
4+
@docker-compose exec app bundle exec rails db:setup
5+
6+
start:
7+
@docker-compose start
8+
9+
clean:
10+
@docker-compose down
11+
@docker system prune --volumes --force
12+
@rm -rf tmp/* || sudo rm -rf tmp/*
13+
@mkdir -p tmp/pids && touch tmp/pids/.keep
14+
15+
bash:
16+
@docker-compose exec app bash
17+
18+
logs:
19+
@docker-compose logs -f --tail=0 app

Diff for: entrypoint.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Remove a potentially pre-existing server.pid for Rails.
5+
rm -f /app/tmp/pids/server.pid
6+
7+
# Then exec the container's main process (what's set as CMD in the Dockerfile).
8+
exec "$@"

0 commit comments

Comments
 (0)