Browse Source

[TOOLS] Make Makefile rule database-force-nuke stop and restart the worker container

experimental
parent
commit
d5fc2cac8a
Signed by: diogo <mail@diogo.site> GPG Key ID: 18D2D35001FBFAB0
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      Makefile

+ 3
- 1
Makefile View File

@@ -29,7 +29,9 @@ psql-shell: .PHONY
docker exec -it $(call translate-container-name,$(strip $(DIR))_db_1) sh -c "psql -U postgres social"

database-force-nuke:
docker exec -it $(call translate-container-name,$(strip $(DIR))_php_1) sh -c "cd /var/www/social; bin/console doctrine:database:drop --force && bin/console doctrine:database:create && bin/console doctrine:schema:update --dump-sql --force && bin/console app:populate_initial_values"
docker stop $(call translate-container-name,$(strip $(DIR))_worker_1) \
&& docker exec -it $(call translate-container-name,$(strip $(DIR))_php_1) sh -c "cd /var/www/social; bin/console doctrine:database:drop --force && bin/console doctrine:database:create && bin/console doctrine:schema:update --dump-sql --force && bin/console app:populate_initial_values" \
&& docker-compose up -d

database-force-schema-update:
docker exec -it $(call translate-container-name,$(strip $(DIR))_php_1) sh -c "/var/www/social/bin/console doctrine:schema:update --dump-sql --force"


Loading…
Cancel
Save