Guide and scripts to locally build the FSFE website or single files of it
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

docker-setup.sh 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env bash
  2. ########################################################################
  3. # Copyright (C) 2019 Michael Weimann <mweimann@fsfe.org>
  4. ########################################################################
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. ########################################################################
  20. #
  21. # This script runs the docker dev setup.
  22. #
  23. #######################################################################
  24. echo -e "\e[96m→ Cloning the website repo\e[0m"
  25. git clone git@git.fsfe.org:FSFE/fsfe-website.git
  26. echo ""
  27. echo -e "\e[96m→ Setting up the config file\e[0m"
  28. cp config.cfg.docker config.cfg
  29. echo ""
  30. echo -e "\e[96m→ Linking the look directory\e[0m"
  31. ln -s ../fsfe-website/look fsfe.org/look
  32. echo ""
  33. echo -e "\e[96m→ Starting the container\e[0m"
  34. docker-compose up --build -d
  35. echo ""
  36. echo -e "\e[96m→ Initial full build\e[0m"
  37. echo -e "\e[33m⚠ This may take some hours\e[0m"
  38. docker exec fsfe-local-build \
  39. bash /fsfe-local-build/fsfe-website/build/build_main.sh \
  40. build_into /fsfe-local-build/fsfe.org/ \
  41. --statusdir /fsfe-local-build/status/ \
  42. || true
  43. echo ""
  44. echo -e "\e[96m→ Stopping the container\e[0m"
  45. docker-compose stop
  46. echo ""