Project

General

Profile

Docker » History » Version 58

Carsten Rose, 14.04.2023 13:30

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