You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
4.9 KiB

3 years ago
  1. ***
  2. ____ _ _ ____ _____
  3. / ___|| \ | |/ ___| ___|
  4. \___ \| \| | | | |_
  5. ___) | |\ | |___| _|
  6. |____/|_| \_|\____|_|
  7. ____ _ ____
  8. | _ \ ___ ___| | _____ _ __ / ___|___ _ __ ___ _ __ ___ ___ ___
  9. | | | |/ _ \ / __| |/ / _ \ '__|____| | / _ \| '_ ` _ \| '_ \ / _ \/ __|/ _ \
  10. | |_| | (_) | (__| < __/ | |_____| |__| (_) | | | | | | |_) | (_) \__ \ __/
  11. |____/ \___/ \___|_|\_\___|_| \____\___/|_| |_| |_| .__/ \___/|___/\___|
  12. |_|
  13. ***
  14. ## Setting up the Nextcloud containers
  15. # Changes in docker/compose/docker-compose.yml
  16. Go to docker-compose.yml and change all AAAAApw to your passwords.
  17. Then change example.org to your domain.
  18. # Install and start docker compose
  19. Point your domain to the public ip of your server.
  20. Enter the command to start dockerd after installing docker on your host system:
  21. ```bash
  22. sudo systemctl start docker
  23. ```
  24. Install docker-compose on your host os and in the folder docker/compose do:
  25. ```bash
  26. sudo docker-compose up
  27. ```
  28. ## Setting up nextcloud with deb-rust-sncf container
  29. # Configure Nextcloud in the admin panel like in the SNCF Doku
  30. Then open example.org in your favourite browser,
  31. create admin account, uncheck install recommended apps.
  32. Do everything as described in sncf (uncheck things in settings, uninstall
  33. everything except forms, apporder) except the alternative custom css if you want
  34. a save button that does nothing than reload (nextcloud does already save realtime)
  35. but the realtime saving could be confusing for some users.
  36. custom css code for save button:
  37. ```CSS
  38. #contactsmenu {
  39. display: none !important;
  40. }
  41. #appmenu {
  42. visibility: hidden;
  43. }
  44. #appmenu li:hover a, #appmenu li a:focus {
  45. font-size: 12px;
  46. }
  47. #appmenu li span {
  48. visibility: hidden;
  49. background-color: yellow;
  50. }
  51. #appmenu li svg {
  52. visibility: hidden;
  53. background-color: yellow;
  54. }
  55. #appmenu li a:last-child::after {
  56. content: "Save";
  57. #padding: 10px;
  58. #margin: 10px;
  59. height: 50%;
  60. width: 200%;
  61. padding-top: 7px;
  62. padding-right: 6px;
  63. #padding-bottom: 10px;
  64. padding-left: 10px;
  65. visibility: visible;
  66. background-color: rgba(237, 237, 237, .7);
  67. color: black;
  68. #text-shadow: 0px 0px 8px black;
  69. font-family: "Mono", Courier, monospace;
  70. font-weight: bold;
  71. border: 1px solid rgba(237, 237, 237, .7);
  72. border-radius: 15px;
  73. }
  74. #appmenu li a:last-child:hover:after {
  75. background-color: rgba(237, 237, 237, 0.7);
  76. border: 1px solid rgba(77, 77, 77, 0.3);
  77. #background-color: #fbc617;
  78. visibility: visible;
  79. }
  80. #appmenu li a:last-child:focus:after {
  81. content: "✓Save";
  82. background-color: rgba(237, 237, 237, 0.7);
  83. border: 1px solid rgba(77, 77, 77, 0.3);
  84. #background-color: #fbc617;
  85. visibility: visible;
  86. }
  87. #settings {
  88. display:none !important;
  89. }
  90. .app-sidebar-tabs__content > ul:nth-child(2) {
  91. display:none !important;
  92. }
  93. .app-sidebar-tabs__content > ul:nth-child(4) > li:nth-child(1) {
  94. display:none !important;
  95. }
  96. .app-sidebar-tabs__content > ul:nth-child(4) > li:nth-child(2) {
  97. display:none !important;
  98. }
  99. ```
  100. # Change nextcloud config for deb-rust-sncf
  101. then changes (with your domain) in config.php
  102. (/opt/docker/overlays/nextcloud/html/config):
  103. ```PHP
  104. 'simpleSignUpLink.shown' => false
  105. 'defaultapp' => 'apporder'
  106. 'trusted_domains' =>
  107. array (
  108. 0 => 'nextcloud-web',
  109. 1 => 'example.org',
  110. ),
  111. 'trusted_proxies' => ['traefik', 'deb-rust-sncf'],
  112. 'overwrite.cli.url' => 'http://example.org',
  113. ```
  114. get the updated config.php in your nextcloud instance with the following command:
  115. ```bash
  116. docker exec -u www-data nextcloud php occ files:scan --all
  117. ```
  118. # Change nextcloud definition in compose file and uncomment deb-rust-sncf
  119. Then open the docker-compose.yml file, comment all labels of the container
  120. nextcloud-web.
  121. Now uncomment the whole deb-rust-sncf container.
  122. If you want to customize the landing or link page, some files are exposed already
  123. (and then copied in the container during build) in the folder build/deb-rust-sncf
  124. Regarding the sncf proxy, the files link.html and forward.rs have changes.
  125. These changes give the functionality to send the admin link to users mail.
  126. Until now, the post http request and the mail adress are saved in a file on the
  127. container deb-rust-sncf.
  128. # Configure rust build withing deb-rust-sncf
  129. Go to docker/build/deb-rust-sncf anyway and make changes in config.toml according
  130. the sncf wiki.
  131. Change the passwords AAAAA and example.org to your domain.
  132. # Remove and restart all containers
  133. Now stop all containers with either issuing
  134. ```bash
  135. sudo docker-compose stop
  136. ```
  137. or pressing `Ctrl-C`
  138. Delete the WHOLE network with the command
  139. ```bash
  140. sudo docker system prune --all
  141. ```
  142. Then restart with
  143. ```bash
  144. sudo docker-compose up
  145. ```
  146. in the folder docker/compose