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.

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