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