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.

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