Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. # preparation
  2. sudo chown -R root:root ${ROOT_DIR}
  3. cd ${TMP_DIR}
  4.  
  5. # init files
  6. cp .env_sample .env
  7. cp .htaccess_sample _htaccess
  8. sed -i "s/%%BASE_URL%%/${BASE_URL}/g" _htaccess
  9. sed -i "s/%%APP_PROTOCOL%%/${APP_PROTOCOL}/g" _htaccess
  10. sed -i "s/%%API_URL%%/${API_URL}/g" .env
  11. sed -i "s/%%APP_PROTOCOL%%/${APP_PROTOCOL}/g" .env
  12.  
  13. # install and build
  14. yarn install
  15. yarn build
  16.  
  17. # move files to correct directories
  18. cp _htaccess build/
  19. cd ${ROOT_DIR}
  20. rm -R *
  21. mv ${TMP_DIR}/build/* ./
  22. mv _htaccess .htaccess
  23. rm -R ${TMP_DIR}/build
  24. rm .env
  25. sudo chown -R www-data:www-data ${ROOT_DIR}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement