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.

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