Project

General

Profile

Docker » History » Version 53

Carsten Rose, 13.04.2023 08:33

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