alpcentaur 8655ffa628 | 1 year ago | |
---|---|---|
docker | 3 years ago | |
README.md | 1 year ago |
Install apache2 utils and get the user+password in the right format for the docker-compose file. Replace USER and PASS accordingly.
sudo apt-get install apache2-utils
echo $(htpasswd -nbB <USER> "<PASS>") | sed -e s/\\$/\\$\\$/g
In docker/compose/docker-compose.yml
replace the "<output>" variable with the output of the echo command above.
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=<output>
Go to docker-compose.yml and change all AAAAApw to your passwords.
Then change example.org to your domain.
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. In the folder docker/compose do:
sudo docker network create proxy
sudo docker-compose up
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 of 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:
#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;
}
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:
sudo docker exec -u www-data nextcloud php occ files:scan --all
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.
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.
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
.