Skip to content

Commit

Permalink
Ease docker usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Un3x committed Dec 5, 2023
1 parent e12ad4b commit 903756a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ DOCKER_COMPOSE_CMD = docker-compose
RAILS_DOCKER_CMD = ${DOCKER_COMPOSE_CMD} exec -e POSTGRES_HOST=db web bundle exec rails

start:
docker-compose up --build
$(DOCKER_COMPOSE_CMD) up --build

stop:
docker-compose down
$(DOCKER_COMPOSE_CMD) down

install_database:
$(RAILS_DOCKER_CMD) db:create
$(RAILS_DOCKER_CMD) db:schema:load
$(RAILS_DOCKER_CMD) db:seed:replant

reinstall_database:
$(RAILS_DOCKER_CMD) db:drop
$(MAKE) install_database
reset_database:
$(RAILS_DOCKER_CMD) db:reset

0 comments on commit 903756a

Please sign in to comment.