No description
Find a file
2021-04-15 13:09:24 +02:00
docker first commit 2021-04-15 13:09:24 +02:00
README.md first commit 2021-04-15 13:09:24 +02:00



/ || \ | |/ | | _ | | | | | |
) | |\ | || |
|
/|
| _|_
||


| _ \ ___ | | _____ _ __ / | _ __ ___ _ __ ___ ___ ___ | | | |/ _ \ / | |/ / _ \ '|| | / _ | ' ` _ | '_ \ / _ / |/ _
| || | () | (
| < / | || || () | | | | | | |) | () _ \ / |____/ _/ _|_|__|| __/|| || |_| ./ _/|/_| |_|


Setting up the Nextcloud containers

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:

	sudo systemctl start docker

Install docker-compose on your host os and in the folder docker/compose do:

	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 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 the realtime saving could be confusing for some users.

custom css code for save button:

  #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):


 '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:

 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-sncf 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

	sudo docker-compose stop

or pressing Ctrl-C

Delete the WHOLE network with the command

	sudo docker system prune --all

Then restart with

	sudo docker-compose up 

in the folder docker/compose