Docker » History » Version 71
Carsten Rose, 18.04.2023 14:45
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 | 64 | Carsten Rose | | Save in kpdev | @Root > webwork20 > webwork20/crose_qfq [docker]@ | |
14 | 51 | Carsten Rose | | T3 FE, xdebug, PMA | @https://webwork20.math.uzh.ch:<port>@ | |
15 | | Start Docker | @docker compose up -d@ | |
||
16 | | Stop Docker | @docker compose down@ | |
||
17 | 60 | Carsten Rose | | *Update Docker Image* | @docker compose down; git pull; docker compose build; docker compose up -d@ | |
18 | 54 | Carsten Rose | |
19 | 26 | Carsten Rose | |
20 | |||
21 | 1 | Benjamin Baer | <pre> |
22 | 21 | Carsten Rose | [root@webwork20] |
23 | |||
24 | $ cd /var/docker/ |
||
25 | 40 | Carsten Rose | $ mkdir <username> |
26 | 1 | Benjamin Baer | $ cd /var/docker/<username> |
27 | |||
28 | 59 | Carsten Rose | # Checkout git repo - decide to if you like to use 'http' or 'ssh'. |
29 | # You can change later, check: https://wiki.math.uzh.ch/public/Git#Change_Repo:_http_.3E_ssh |
||
30 | 58 | Carsten Rose | |
31 | # http: you have to specify username/password for every remote GIT action. |
||
32 | 1 | Benjamin Baer | $ git clone https://systemvcs.math.uzh.ch/it/typo3-docker.git <username_instancename> |
33 | 58 | Carsten Rose | |
34 | # ssh: username/password is given automatically, login via ssh-agent forward: ssh -A root@webwork20 |
||
35 | 61 | Carsten Rose | $ git clone git@systemvcs.math.uzh.ch:it/typo3-docker.git <username_instancename> |
36 | 58 | Carsten Rose | |
37 | # Main Branch ist Typo3 V10 |
||
38 | 37 | Carsten Rose | |
39 | 39 | Carsten Rose | # In case T3 V11 should be used |
40 | 21 | Carsten Rose | $ git checkout typo11 |
41 | |||
42 | 40 | Carsten Rose | $ cd /var/docker/<username>/<username_instancename> |
43 | 21 | Carsten Rose | |
44 | 66 | Carsten Rose | # Create docker images and prepare nginx, mariadb, pma |
45 | 21 | Carsten Rose | # execute bootstrap.py |
46 | $ python3 bootstrap.py |
||
47 | 66 | Carsten Rose | .... |
48 | ⠿ Network crose1_dev_default Created 0.1s |
||
49 | ⠿ Container crose1_dev-mariadb-1 Healthy 16.5s |
||
50 | ⠿ Container crose1_dev-pma-1 Started 17.0s |
||
51 | ⠿ Container crose1_dev-nginx-1 Started 17.2s |
||
52 | First time install: http://webwork20:51515/typo3/install.php |
||
53 | web: http://webwork20:51515 |
||
54 | pma: http://webwork20:52195 |
||
55 | xdebug: 53859 |
||
56 | ssh: ssh root@webwork20 -p 58785 |
||
57 | |||
58 | #------------------------------------------------------- |
||
59 | # Create a keepass entry in @kpdev@ under webwork20, incl. your instance password, with the above mentioned ports! |
||
60 | #------------------------------------------------------- |
||
61 | |||
62 | #------------------------------------------------------- |
||
63 | # Configure ssh passwordless access to the nginx/php docker. |
||
64 | # If not already done before, create a personal private/public SSH keys (in thinlinc): ssh-keygen -t ed25519 |
||
65 | #------------------------------------------------------- |
||
66 | |||
67 | # Transfer the public SSH key from Thinlinc to the docker on webwork20. |
||
68 | [user@tlx] cat ~/.ssh/id_ed25519.pub |
||
69 | ssh-ed25519 AAA... |
||
70 | |||
71 | # Copy/paste the key on webwork20 |
||
72 | [root@webwork20] vim ssh/authorized_keys |
||
73 | |||
74 | # Test the password less login ... accept the new SSH hostkey. |
||
75 | [user@tlx] ssh root@webwork20 -p 58785 |
||
76 | 64 | Carsten Rose | </pre> |
77 | |||
78 | 30 | Carsten Rose | h1. Typo3 |
79 | 22 | Carsten Rose | |
80 | 67 | Carsten Rose | * Open T3/BE: https://webwork20:xxxx/typo3/install.php |
81 | 22 | Carsten Rose | |
82 | 1 | Benjamin Baer | !typo3_1.png! |
83 | 22 | Carsten Rose | |
84 | 1 | Benjamin Baer | !typo3_2.png! |
85 | 22 | Carsten Rose | |
86 | 1 | Benjamin Baer | * Choose "take me straight to the backend" |
87 | 22 | Carsten Rose | |
88 | 63 | Carsten Rose | * Login > extension: add a) fluid styled content, b) typo3 edit highlighting |
89 | 22 | Carsten Rose | |
90 | !clipboard-202303281403-ewftg.png! |
||
91 | 1 | Benjamin Baer | |
92 | 63 | Carsten Rose | !t3editor.png! |
93 | |||
94 | |||
95 | 22 | Carsten Rose | * Install latest qfq (https://qfq.io/download/?dir=releases) and uzh_cd (https://www.math.uzh.ch/repo/?dir=uzhcd/v9) |
96 | 15 | Benjamin Baer | * Create first page: |
97 | 24 | Carsten Rose | |
98 | 1 | Benjamin Baer | !typo3_4.png! |
99 | 15 | Benjamin Baer | !typo3_5.png! |
100 | !typo3_6.png! |
||
101 | 24 | Carsten Rose | |
102 | 15 | Benjamin Baer | * Under access, set page visible to true |
103 | * Add template to home (via plus): |
||
104 | 1 | Benjamin Baer | !typo3_7_t1.png! |
105 | 16 | Benjamin Baer | !typo3_7_t2.png! |
106 | !typo3_7_t3.png! |
||
107 | |||
108 | * Add page content > QFQ to home |
||
109 | |||
110 | !qfq_1.png! |
||
111 | |||
112 | <pre> |
||
113 | 10.sql = SELECT "Hello world from QFQ, ", NOW() |
||
114 | </pre> |
||
115 | |||
116 | * Try view page on home for a first test: |
||
117 | !qfq2.png! |
||
118 | |||
119 | * As instructed, create a new page "Form" with pagecontent [QFQ] Form under Home and load the formEditor: |
||
120 | <pre> |
||
121 | file=_formEditor |
||
122 | 18 | Enis Nuredini | </pre> |
123 | |||
124 | * Reload the page |
||
125 | 1 | Benjamin Baer | !qfq3.png! |
126 | 71 | Carsten Rose | |
127 | * Get and remember the T3 version (for source directory in PhpStorm) |
||
128 | |||
129 | !clipboard-202304181445-ecvvz.png! |
||
130 | 1 | Benjamin Baer | |
131 | 17 | Benjamin Baer | * Done with typo3! |
132 | |||
133 | 30 | Carsten Rose | h1. PhpStorm |
134 | 17 | Benjamin Baer | |
135 | 65 | Carsten Rose | * *Replace* the following ports with yours! |
136 | |||
137 | 69 | Carsten Rose | | Config File | @/var/docker/<username>/<username_instancename>/config.json@ | |
138 | 65 | Carsten Rose | | First time install | http://webwork20:51515/typo3/install.php | |
139 | | web | http://webwork20:51515 | |
||
140 | | pma | http://webwork20:52195 | |
||
141 | | xdebug | 53859 | |
||
142 | | ssh | ssh root@webwork20 -p 58785 | |
||
143 | 43 | Carsten Rose | |
144 | 31 | Carsten Rose | * PhpStorm: @File > Settings > PHP > Debug@ |
145 | |||
146 | 70 | Carsten Rose | !clipboard-202304181438-qmb9t.png! |
147 | 68 | Carsten Rose | |
148 | 69 | Carsten Rose | * List all of the xdebug ports of your docker containers, comma separated. |
149 | * REMOVE 9000, else phpstorm will still stop webwork16. |
||
150 | 1 | Benjamin Baer | * Add Server: |
151 | 31 | Carsten Rose | |
152 | 1 | Benjamin Baer | !xdebug2.png! |
153 | 31 | Carsten Rose | |
154 | 17 | Benjamin Baer | ** Please give a detailed name, eg. webwork20 dev, there will be multiple deployments on the same server! |
155 | ** Use the port for the website, not the xdebug port! |
||
156 | ** You can already map the path of extension > /var/www/html/typo3conf/ext/qfq/ |
||
157 | 1 | Benjamin Baer | ** You may not see the typo3 sources: |
158 | 31 | Carsten Rose | |
159 | 1 | Benjamin Baer | !xdebug3.png! |
160 | 31 | Carsten Rose | |
161 | 17 | Benjamin Baer | ** If you see it, map typo3_src_10.4.34 to /var/www/typo3_src (see screenshot) |
162 | 1 | Benjamin Baer | ** If not, add additional sources to your phpstorm project, then do above: |
163 | 31 | Carsten Rose | |
164 | 1 | Benjamin Baer | !xdebug4.png! |
165 | 31 | Carsten Rose | |
166 | 17 | Benjamin Baer | *** Got to File > Settings > Directories and Add new Root Directory |
167 | *** Add /scratch/software/typo3 |
||
168 | *** Mark typo3_src_10.4.34 as Source Folder (also extension in the qfq folder, if you haven't) |
||
169 | 1 | Benjamin Baer | * Finally add a new xdebug setting: |
170 | 31 | Carsten Rose | |
171 | 17 | Benjamin Baer | !xdebug5.png! |
172 | 1 | Benjamin Baer | !xdebug6.png! |
173 | 31 | Carsten Rose | |
174 | 17 | Benjamin Baer | ** Here you can select the server you added before |
175 | ** Remove webwork16 if you didn't remove port 9000, to not stop webwork16 by accident. |
||
176 | * Deployment path: |
||
177 | 32 | Carsten Rose | ** Tools > Deployment > Configuration |
178 | 31 | Carsten Rose | |
179 | 17 | Benjamin Baer | !xdebug7.png! |
180 | 33 | Carsten Rose | |
181 | !clipboard-202303281446-d1okl.png! |
||
182 | |||
183 | 19 | Benjamin Baer | !xdebug8.png! |
184 | 30 | Carsten Rose | |
185 | 34 | Carsten Rose | * Wenn gewuenscht kann der automatische Upload aktiviert werden: |
186 | |||
187 | !clipboard-202303281501-vsrv2.png! |
||
188 | |||
189 | 49 | Carsten Rose | h1. Tipps |
190 | |||
191 | 50 | Carsten Rose | * If the FormEditor is broken and has problems to show note.gif, the baseUrl is probably not configure in QFQ setup. |
192 | 49 | Carsten Rose | * Configure correct Site entry point |
193 | |||
194 | !clipboard-202304081911-mfwna.png! |
||
195 | |||
196 | 1 | Benjamin Baer | h1. Issues |
197 | |||
198 | 36 | Carsten Rose | * #15745 |
199 | 62 | Carsten Rose | |
200 | h1. PHPUnit Tests |