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.

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