Project

General

Profile

Docker » History » Version 54

Carsten Rose, 13.04.2023 08:35

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