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.

194 lines
4.3 KiB

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