Project

General

Profile

Docker » History » Version 50

Carsten Rose, 08.04.2023 19:13

1 1 Benjamin Baer
h1. Docker
2 15 Benjamin Baer
3 29 Carsten Rose
{{toc}}
4 28 Carsten Rose
5 26 Carsten Rose
Handout
6
7 38 Carsten Rose
| *Topic* | *Description* |
8 40 Carsten Rose
| /var/docker/<username> | Per user docker installation(s) |
9
| /var/docker/<username>/<username_instancename>/config.json | Ports |
10 27 Carsten Rose
| @https://webwork20.math.uzh.ch:<port>@ | T3 FE, xdebug, PMA |
11 46 Carsten Rose
| @docker compose up -d@ | Start docker current instance (directory) |
12 48 Carsten Rose
| @docker compose down@ | Stop docker current instance (directory) |
13 26 Carsten Rose
14
15 1 Benjamin Baer
<pre>
16 21 Carsten Rose
[root@webwork20]
17
18
$ cd /var/docker/
19 40 Carsten Rose
$ mkdir <username>
20
$ cd /var/docker/<username>
21 21 Carsten Rose
22
# Checkout git repo: 
23 37 Carsten Rose
# Master Branch ist Typo3 V10
24 40 Carsten Rose
$ git clone https://systemvcs.math.uzh.ch/it/typo3-docker.git <username_instancename>
25 37 Carsten Rose
26 39 Carsten Rose
# In case T3 V11 should be used
27 21 Carsten Rose
$ git checkout typo11
28
29 40 Carsten Rose
$ cd /var/docker/<username>/<username_instancename>
30 21 Carsten Rose
31
# execute bootstrap.py
32
$ python3 bootstrap.py
33 1 Benjamin Baer
</pre>
34 15 Benjamin Baer
35 30 Carsten Rose
h1. Typo3 
36 22 Carsten Rose
37
* Save personal links and ports. Best in @kpweb: webwork20/<user>@
38
* Open mentioned T3/BE: https://webwork20:xxxx/typo3/install.php
39
40 1 Benjamin Baer
!typo3_1.png!
41 22 Carsten Rose
42 1 Benjamin Baer
!typo3_2.png!
43 22 Carsten Rose
44 1 Benjamin Baer
* Choose "take me straight to the backend"
45 22 Carsten Rose
46 24 Carsten Rose
* Login > extension: add fluid styled content:
47 22 Carsten Rose
48
!clipboard-202303281403-ewftg.png!
49 1 Benjamin Baer
50 22 Carsten Rose
* Install latest qfq (https://qfq.io/download/?dir=releases) and uzh_cd (https://www.math.uzh.ch/repo/?dir=uzhcd/v9)
51 15 Benjamin Baer
* Create first page:
52 24 Carsten Rose
53 1 Benjamin Baer
!typo3_4.png!
54 15 Benjamin Baer
!typo3_5.png!
55
!typo3_6.png!
56 24 Carsten Rose
57 15 Benjamin Baer
* Under access, set page visible to true
58
* Add template to home (via plus):
59 1 Benjamin Baer
!typo3_7_t1.png!
60 16 Benjamin Baer
!typo3_7_t2.png!
61
!typo3_7_t3.png!
62
63
* Add page content > QFQ to home
64
65
!qfq_1.png!
66
67
<pre>
68
10.sql = SELECT "Hello world from QFQ, ", NOW()
69
</pre>
70
71
* Try view page on home for a first test:
72
!qfq2.png!
73
74
* As instructed, create a new page "Form" with pagecontent [QFQ] Form under Home and load the formEditor:
75
<pre>
76
file=_formEditor
77
</pre>
78
79 1 Benjamin Baer
* Reload the page
80 18 Enis Nuredini
!qfq3.png!
81
82
* Activate typo3 edit highlighting
83 17 Benjamin Baer
!t3editor.png!
84 1 Benjamin Baer
85 17 Benjamin Baer
* Done with typo3!
86
87 30 Carsten Rose
h1. PhpStorm
88 17 Benjamin Baer
89 43 Carsten Rose
* You need the url of the page AND the xdebug port from the installation. If you do not remember them, check @/var/docker/<username>/<username_instancename>/config.json@.
90 31 Carsten Rose
* PhpStorm: @File > Settings > PHP > Debug@
91
92 1 Benjamin Baer
!xdebug1.png!
93 31 Carsten Rose
94 17 Benjamin Baer
* List all of the xdebug ports of your docker containers, comma separated. REMOVE 9000, else phpstorm will still stop webwork16.
95 1 Benjamin Baer
* Add Server:
96 31 Carsten Rose
97 1 Benjamin Baer
!xdebug2.png!
98 31 Carsten Rose
99 17 Benjamin Baer
** Please give a detailed name, eg. webwork20 dev, there will be multiple deployments on the same server!
100
** Use the port for the website, not the xdebug port!
101
** You can already map the path of extension > /var/www/html/typo3conf/ext/qfq/
102 1 Benjamin Baer
** You may not see the typo3 sources:
103 31 Carsten Rose
104 1 Benjamin Baer
!xdebug3.png!
105 31 Carsten Rose
106 17 Benjamin Baer
** If you see it, map typo3_src_10.4.34 to /var/www/typo3_src (see screenshot)
107 1 Benjamin Baer
** If not, add additional sources to your phpstorm project, then do above:
108 31 Carsten Rose
109 1 Benjamin Baer
!xdebug4.png!
110 31 Carsten Rose
111 17 Benjamin Baer
*** Got to File > Settings > Directories and Add new Root Directory
112
*** Add /scratch/software/typo3
113
*** Mark typo3_src_10.4.34 as Source Folder (also extension in the qfq folder, if you haven't)
114 1 Benjamin Baer
* Finally add a new xdebug setting:
115 31 Carsten Rose
116 17 Benjamin Baer
!xdebug5.png!
117 1 Benjamin Baer
!xdebug6.png!
118 31 Carsten Rose
119 17 Benjamin Baer
** Here you can select the server you added before
120
** Remove webwork16 if you didn't remove port 9000, to not stop webwork16 by accident.
121
* Deployment path:
122 32 Carsten Rose
** Tools > Deployment > Configuration
123 31 Carsten Rose
124 17 Benjamin Baer
!xdebug7.png!
125 33 Carsten Rose
126
!clipboard-202303281446-d1okl.png!
127
128 19 Benjamin Baer
!xdebug8.png!
129 30 Carsten Rose
130 34 Carsten Rose
* Wenn gewuenscht kann der automatische Upload aktiviert werden:
131
132
!clipboard-202303281501-vsrv2.png!
133
134 49 Carsten Rose
h1. Tipps
135
136 50 Carsten Rose
* If the FormEditor is broken and has problems to show note.gif, the baseUrl is probably not configure in QFQ setup.
137 49 Carsten Rose
* Configure correct Site entry point
138
139
!clipboard-202304081911-mfwna.png!
140
141 1 Benjamin Baer
h1. Issues
142
143 36 Carsten Rose
* #15745