|
1 | 1 | # 360.skilltech.tools
|
2 | 2 |
|
3 |
| -## Setup |
| 3 | +360.skilltech.tools is a tool to create virtual tours from 360° photos. It uses web technologies and works with any recent web browser. The main features are: |
4 | 4 |
|
5 |
| -To redirect the 360.skilltech.tools domain to your computer, add this line to your hosts file: |
| 5 | + - Link 360° photos together |
| 6 | + - Add points of interest with text and images |
| 7 | + - Share the tour as an hyperlink / QR-Code |
| 8 | + - Export the tour as a Zip file to self-host |
6 | 9 |
|
7 |
| -``` |
8 |
| -#/etc/hosts |
9 |
| -127.0.0.1 360.skilltech.tools |
10 |
| -``` |
| 10 | +## Technologies |
11 | 11 |
|
12 |
| -A sample config file is located at src/config.sample.php, copy it to src/config.php and adjust its content to your needs. Especially, you need to fill all the OIDC* constants to allow this app to use an autentication server. You should modify the USER_AGENT value with a unique string representing you so that when the app download an image from the web, the remote web server recognizes you. |
| 12 | + - A-frame |
| 13 | + - Vue.js |
| 14 | + - PHP |
| 15 | + - MariaDB |
| 16 | + - NGINX |
| 17 | + - Docker |
13 | 18 |
|
14 |
| -## Spin containers |
| 19 | +## Installation |
15 | 20 |
|
16 |
| -Verify that no other running container uses the 80 and 443 ports, then run the containers: |
| 21 | +Instructions stands in /doc/installation.md. You will find a docker-compose file to quickly setup a development or production environment. |
17 | 22 |
|
18 |
| -### Dev profile |
| 23 | +## Issues |
19 | 24 |
|
20 |
| -The dev profile will launch the vue app built on the fly by Vite. The nginx server will redirect requests to either the vue app or the php server as needed. |
21 |
| - |
22 |
| -``` |
23 |
| -cd /path/to/360.skilltech.tools |
24 |
| -docker compose --profile dev up -d |
25 |
| -``` |
26 |
| - |
27 |
| -### Prod profile |
28 |
| - |
29 |
| -The dev profile will launch vite to build the vue app once. The nginx server will both serve the vue static files and the php scripts. |
30 |
| - |
31 |
| -``` |
32 |
| -cd /path/to/360.skilltech.tools |
33 |
| -docker compose --profile prod up -d |
34 |
| -``` |
35 |
| - |
36 |
| -### Build profile |
37 |
| - |
38 |
| -The build profile will only launch the build process of the vue app, the resulting files will be placed in /vue-app/dist. |
39 |
| - |
40 |
| -``` |
41 |
| -cd /path/to/360.skilltech.tools |
42 |
| -docker compose --profile build up -d |
43 |
| -``` |
44 |
| - |
45 |
| -### Create needed tables into the database |
46 |
| - |
47 |
| -The first time you launch the app (see above), an empty database names "tour" is created. You need to fill it with tables. This is one way to do so: |
48 |
| - |
49 |
| -Launch the dev profile then open the mariadb cli into the maria-db container: |
50 |
| -``` |
51 |
| -docker exec -ti 360skilltechtools-mariadb-1 mariadb -u root --password=rootpassword tour |
52 |
| -``` |
53 |
| - |
54 |
| -If you use the docker desktop app, just execute this line ito the mariadb container: |
55 |
| -``` |
56 |
| -mariadb -u root --password=rootpassword tour |
57 |
| -``` |
58 |
| - |
59 |
| -You are now into the mariadb shell, all the SQL commands you enter here will be executed into the "tour" database. We will execute the content of a file to create the tables with this command: |
60 |
| - |
61 |
| -``` |
62 |
| -source /sql_dump/create_tables.sql |
63 |
| -``` |
64 |
| - |
65 |
| -When it's done you can quit the mariadb shell with the ```exit``` command. |
66 |
| - |
67 |
| -### Files permissions |
68 |
| - |
69 |
| -The PHP server is running as the "www-data" user (number 33), then it can only access files owned by this user. The easiest way to allow PHP to read and write into the www folder is to allow everyone to do so. You can achieve that with this command line: |
70 |
| - |
71 |
| -``` |
72 |
| -cd /path/to/360.skilltech.tools |
73 |
| -chmod -R 777 www |
74 |
| -``` |
75 |
| - |
76 |
| -Another solution which is cleaner is to modify the owner of the files to www-data. The group owner of the file will remain your group, but you will need to allow this group to read and write into the folder if you want to be able to do so from the host. |
77 |
| - |
78 |
| -``` |
79 |
| -cd /path/to/360.skilltech.tools |
80 |
| -chown -R 33:$USER |
81 |
| -chmod -R ug+rw www |
82 |
| -``` |
83 |
| - |
84 |
| -## Files |
85 |
| - |
86 |
| -Files at the root path https://360.skilltech.tools |
87 |
| -All PHP files in /www are served by the nginx server at https://360.skilltech.tools. The PHP source files are in the /src folder as not to be directly accessible by the web server. |
88 |
| - |
89 |
| -## Branches |
90 |
| - |
91 |
| -The main branch is where the development happens. The test branch is used to publish the application on our test server. When you merge the code from the main branch to the test branch and a Continuous Integration script is triggered to update the hosted version. To do so: |
92 |
| - |
93 |
| -Commit everything on main : |
94 |
| - |
95 |
| -``` |
96 |
| -git add . |
97 |
| -git commit -am "Fix nasty bug" |
98 |
| -git push |
99 |
| -``` |
100 |
| - |
101 |
| -And then merge the main branch into test : |
102 |
| - |
103 |
| -``` |
104 |
| -git checkout test |
105 |
| -git merge main |
106 |
| -git push |
107 |
| -git checkout main |
108 |
| -``` |
| 25 | +Any issue can be reported at bugs@skilltech.dev |
109 | 26 |
|
110 | 27 | ## Licences
|
111 | 28 |
|
112 | 29 | Unless otherwise stated, source code found in this repository is distributed under the AGPL v3 licence.
|
113 |
| -Code found in www/v is distributed under the MIT Licence (Expat) |
| 30 | +The source code of the viewer that resides in www/v is distributed under the MIT Licence (Expat) |
114 | 31 |
|
115 | 32 | See CREDITS.md for more details about licences and contributors.
|
116 | 33 |
|
117 |
| - |
118 |
| - |
0 commit comments