*** # Setting up the Nextcloud containers ## set up http auth in the traefik instance install apache2 utils and get the user+password in the right format for the docker-compose file ```bash suo apt-get install apache2-utils echo $(htpasswd -nbB "") | sed -e s/\\$/\\$\\$/g ``` In `docker/compose/docker-compose.yml` fill in the to the right place In this case, in the beginning, put it under the nextcloud instance. Then later, when disabling nextcloud-web, uncomment and fill in under traefik middlewares regarding the labels of the deb-rust-sncf container. nextcloud-web: label: - "traefik.http.routers.nextcloud.middlewares=nextcloud, nextcloud-auth" - "traefik.http.middlewares.nextcloud-auth.basicauth.users= ## Further changes in docker/compose/docker-compose.yml Go to docker-compose.yml and change all AAAAApw to your passwords. Then change example.org to your domain. ## Install and start docker compose Point your domain to the public ip of your server. Enter the command to start dockerd after installing docker on your host system: ```bash sudo systemctl start docker ``` Install docker-compose on your host os. In the folder docker/compose do: ```bash sudo docker network create proxy sudo docker-compose up ``` # Setting up nextcloud with deb-rust-sncf container ## Configure Nextcloud in the admin panel like in the SNCF Doku Then open example.org in your favourite browser. Create the admin account, uncheck install recommended apps. Do everything as described in sncf (uncheck things in settings, uninstall everything except forms, apporder). Except the alternative custom css: If you want a save button that does nothing than reload (nextcloud does already save realtime) But our thought was, the realtime saving could be confusing for some users. custom css code for save button: ```CSS #contactsmenu { display: none !important; } #appmenu { visibility: hidden; } #appmenu li:hover a, #appmenu li a:focus { font-size: 12px; } #appmenu li span { visibility: hidden; background-color: yellow; } #appmenu li svg { visibility: hidden; background-color: yellow; } #appmenu li a:last-child::after { content: "Save"; #padding: 10px; #margin: 10px; height: 50%; width: 200%; padding-top: 7px; padding-right: 6px; #padding-bottom: 10px; padding-left: 10px; visibility: visible; background-color: rgba(237, 237, 237, .7); color: black; #text-shadow: 0px 0px 8px black; font-family: "Mono", Courier, monospace; font-weight: bold; border: 1px solid rgba(237, 237, 237, .7); border-radius: 15px; } #appmenu li a:last-child:hover:after { background-color: rgba(237, 237, 237, 0.7); border: 1px solid rgba(77, 77, 77, 0.3); #background-color: #fbc617; visibility: visible; } #appmenu li a:last-child:focus:after { content: "✓Save"; background-color: rgba(237, 237, 237, 0.7); border: 1px solid rgba(77, 77, 77, 0.3); #background-color: #fbc617; visibility: visible; } #settings { display:none !important; } .app-sidebar-tabs__content > ul:nth-child(2) { display:none !important; } .app-sidebar-tabs__content > ul:nth-child(4) > li:nth-child(1) { display:none !important; } .app-sidebar-tabs__content > ul:nth-child(4) > li:nth-child(2) { display:none !important; } ``` ## Change nextcloud config for deb-rust-sncf then changes (with your domain) in config.php (/opt/docker/overlays/nextcloud/html/config): ```PHP 'simpleSignUpLink.shown' => false 'defaultapp' => 'apporder' 'trusted_domains' => array ( 0 => 'nextcloud-web', 1 => 'example.org', ), 'trusted_proxies' => ['traefik', 'deb-rust-sncf'], 'overwrite.cli.url' => 'http://example.org', ``` get the updated config.php in your nextcloud instance with the following command: ```bash sudo docker exec -u www-data nextcloud php occ files:scan --all ``` ## Change nextcloud definition in compose file and uncomment deb-rust-sncf Then open the docker-compose.yml file, comment all labels of the container nextcloud-web. Now uncomment the whole deb-rust-sncf container. If you want to customize the landing or link page, some files are exposed already (and then copied in the container during build) in the folder `build/deb-rust-sncf`. Regarding the sncf proxy, the files link.html and forward.rs have changes. These changes give the functionality to send the admin link to users mail. Until now, the post http request and the mail adress are saved in a file on the container deb-rust-sncf. ## Configure rust build withing deb-rust-sncf Go to `docker/build/deb-rust-snc` anyway and make changes in config.toml according the sncf wiki. Change the passwords AAAAA and example.org to your domain. ## Remove and restart all containers Now stop all containers with either issuing ```bash sudo docker-compose stop ``` or pressing `Ctrl-C` Delete the WHOLE network with the command ```bash sudo docker system prune --all ``` Then restart with ```bash sudo docker-compose up ``` in the folder `docker/compose`.