Created
May 28, 2020 15:38
-
-
Save MrSunshyne/53a89475e00ff3a98791061f26ec46cb to your computer and use it in GitHub Desktop.
Directus Operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!make | |
include .env | |
export $(shell sed 's/=.*//' .env) | |
build: | |
@echo "hi ${SOURCE_DATABASE_NAME}" | |
export: | |
@(docker exec -i ${SOURCE_CONTAINER_ID} mysqldump -u ${SOURCE_DATABASE_USERNAME} -p${SOURCE_DATABASE_PASSWORD} ${SOURCE_DATABASE_NAME}) > ../directusdb/dump.sql | |
import: | |
@docker exec -i ${TARGET_CONTAINER_ID} mysql -u${TARGET_DATABASE_USERNAME} -p${TARGET_DATABASE_PASSWORD} ${TARGET_DATABASE_NAME} < ../directusdb/dump.sql | |
@echo "Import done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
requires a .env file with the variables