Wiki source code of Installation
Version 6.1 by Jan Brinkhaus on 2023/02/07 11:19
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = Prerequisite: Docker installation = | ||
2 | |||
3 | FileSync is deployed as docker container. You need a running docker installation for it to be installed. | ||
4 | |||
5 | If you setup a new VM for this, we suggest the newest Ubuntu LTS release. | ||
6 | |||
7 | If you already have a server or VM with a running docker, just skip this chapter and go on with "Installation". | ||
8 | |||
9 | === Install docker on linux === | ||
10 | |||
11 | The installation of docker on linux is straightforward. If you Google this topic you will find explanations from the Docker website which invite you to do a manual installation of docker by downloading and installing their actual version. From a technical perspective this is not needed. At least Brinkhaus does not need bleeding edge docker installation. We recommend to just use the docker version which comes from your Linux distribution. | ||
12 | |||
13 | On a typical Ubuntu or Debian you go with | ||
14 | |||
15 | (% class="box" %) | ||
16 | ((( | ||
17 | (% class="code" %) | ||
18 | ((( | ||
19 | sudo apt update | ||
20 | |||
21 | sudo apt install docker docker-compose | ||
22 | ))) | ||
23 | ))) | ||
24 | |||
25 | === Install docker on Windows === | ||
26 | |||
27 | The installation of docker for Windows is described here: [[https:~~/~~/docs.docker.com/desktop/install/windows-install/>>url:https://docs.docker.com/desktop/install/windows-install/]] | ||
28 | |||
29 | = Installation = | ||
30 | |||
31 | On a computer with Docker, just choose a target directory which fits for your case, deploy our docker-compose file there and start the app. | ||
32 | |||
33 | **Suggestion for quick start for linux** | ||
34 | |||
35 | (% class="box" %) | ||
36 | ((( | ||
37 | (% class="code" %) | ||
38 | ((( | ||
39 | sudo mkdir /var/docker_data | ||
40 | cd /var/docker_data/ | ||
41 | sudo wget -O docker-compose.yml https:~/~/xwiki.brinkhaus-gmbh.de/bin/download/Product%20support/FileSync/WebHome/docker-compose.yml?rev=1.1 | ||
42 | sudo docker login registry.gitlab.com/v2/b3935 -u datastore-dl -p glpat-S9xzXzoUxuxGboW53r2x | ||
43 | \\sudo docker-compose up -d | ||
44 | ))) | ||
45 | ))) | ||
46 | |||
47 | You are afterwards able to log in via the web interface on port 80 of the server where you installed FileSync. | ||
48 | |||
49 | |||
50 | **Suggestion for quick start for Windows** | ||
51 | |||
52 | Place the docker-compose file from here [[https:~~/~~/xwiki.brinkhaus-gmbh.de/bin/download/Product%20support/FileSync/WebHome/docker-compose.yml?rev=1.1>>url:https://xwiki.brinkhaus-gmbh.de/bin/download/Product%20support/FileSync/WebHome/docker-compose.yml?rev=1.1]] in a directory of your needs and run "docker-compose up -d". | ||
53 | |||
54 | |||
55 | = Variants / hints = | ||
56 | |||
57 | You can adapt the docker-compose file to your local needs. The file which we give for a quick start is: | ||
58 | |||
59 | (% class="box" %) | ||
60 | ((( | ||
61 | (% class="code" %) | ||
62 | ((( | ||
63 | version: "3" | ||
64 | \\services: | ||
65 | filesync: | ||
66 | image~: registry.gitlab.com/b3935/ftpmodule/filesync:latest | ||
67 | container_name: filesync | ||
68 | restart: always | ||
69 | volumes: | ||
70 | - ./data:/app/data | ||
71 | \\ ports: | ||
72 | - 80:80 | ||
73 | ))) | ||
74 | ))) | ||
75 | |||
76 | This results in a password-less direct access to a UI on the target server. | ||
77 | |||
78 | We below give an example for enclosing FileSync with Traefik as middleware for adding an easy authentification function: | ||
79 | |||
80 | (% class="box" %) | ||
81 | ((( | ||
82 | (% class="code" %) | ||
83 | ((( | ||
84 | version: "3" | ||
85 | \\services: | ||
86 | traefik: | ||
87 | image~: traefik:v2.2 | ||
88 | command: | ||
89 | - "~-~-providers.docker" | ||
90 | - "~-~-entrypoints.web.address=:80" | ||
91 | ports: | ||
92 | - "80:80" | ||
93 | volumes: | ||
94 | - /var/run/docker.sock:/var/run/docker.sock | ||
95 | # needed for using a dynamic password, settable from FileSync UI; links data/settings/ to the folder where | ||
96 | # it is described in the "labels" of the filesync container | ||
97 | - ./data:/var/docker_data/data | ||
98 | \\ filesync: | ||
99 | image~: registry.gitlab.com/b3935/ftpmodule/filesync:latest | ||
100 | container_name: filesync | ||
101 | restart: always | ||
102 | volumes: | ||
103 | - ./data:/app/data | ||
104 | \\# commented out because Traefik creates a protected rout for hisself | ||
105 | # ports: | ||
106 | # - 80:80 | ||
107 | \\ labels: | ||
108 | - "traefik.http.routers.filesync.entrypoints=web" | ||
109 | - "traefik.http.routers.filesync.rule=Host(`datastore-playground.euprogigant.io`)" | ||
110 | - "traefik.http.routers.filesync.middlewares=auth" | ||
111 | - "traefik.http.services.filesync.loadbalancer.server.port=80" | ||
112 | # hard coded password; hash retrievable via "htpasswd -bnBC 10 admin PASSWORD" | ||
113 | - "traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$10$$2u0mbq4FI.EpN6Gu5O.BpO5Fh8RrXBr.MUT8JyqbYGtNfLn19OhTe" # credentials admin:changeme | ||
114 | # dynamic password, settable from FileSync UI; needs link of data/settings/ in the docker container of Traefik | ||
115 | # - "traefik.http.middlewares.auth.basicauth.usersfile=/var/docker_data/data/settings/hashedPW.txt" | ||
116 | ))) | ||
117 | ))) |