Upgrade 2204 » History » Version 14
Carsten Rose, 05.01.2024 10:05
1 | 14 | Carsten Rose | {{toc}} |
---|---|---|---|
2 | |||
3 | |||
4 | 2 | Enis Nuredini | h1. Docker Upgrade - Ubuntu 22-04 |
5 | 1 | Enis Nuredini | |
6 | h2. New docker container |
||
7 | |||
8 | 9 | Enis Nuredini | It is recommended to create a new docker container with the new typo3 docker branch *ubuntu22* instead of upgrading an existing one. |
9 | 1 | Enis Nuredini | How to clone the specific branch: |
10 | <pre> |
||
11 | git clone -b ubuntu22 https://git.math.uzh.ch/typo3/typo3-docker.git |
||
12 | </pre> |
||
13 | |||
14 | h2. Upgrading existing docker |
||
15 | |||
16 | 10 | Enis Nuredini | Manual to upgrade an existing docker container and setting up websocket server. |
17 | 7 | Enis Nuredini | |
18 | 8 | Enis Nuredini | *Caution:* The used websocket port 8090 in this manual is only an example. Please use a port number which is not already used from others on the same server. |
19 | 1 | Enis Nuredini | <pre> |
20 | 1. At least Ubuntu 22.04 needs to be installed in docker container. (Usually done inside Dockerfile.nginx): |
||
21 | FROM ubuntu:22.04 |
||
22 | |||
23 | 1.1 Add the following to the top of your docker file (after FROM ubuntu:22.04) if it does not already exist. It defines the timezone configurations for the ubuntu 22.04 installation: |
||
24 | ENV DEBIAN_FRONTEND=noninteractive |
||
25 | RUN apt-get update && \ |
||
26 | apt-get install -y tzdata && \ |
||
27 | ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \ |
||
28 | dpkg-reconfigure --frontend noninteractive tzdata |
||
29 | |||
30 | |||
31 | 3 | Enis Nuredini | 1.2(optional) If you are using wkhtmltopdf 0.12.6-1, you will need to manually install libssl1.1 in the docker file before wkhtmltopdf is installed. Reason: libssl1.1 is no longer included in Ubuntu 22.04: |
32 | 1 | Enis Nuredini | # Manually install libssl1.1 |
33 | RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
||
34 | RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
||
35 | |||
36 | 4 | Enis Nuredini | 2. Best practice is to expose the websocket port in the dockerfile (Dockerfile.nginx), it should be added before the services start, example: |
37 | 1 | Enis Nuredini | EXPOSE 8090 |
38 | CMD service php8.1-fpm start && service ssh start && nginx |
||
39 | |||
40 | |||
41 | 3. Add new websocket port (8090) to nginx webserver in Dockerfile, example: |
||
42 | nginx: |
||
43 | image: webserver |
||
44 | build: |
||
45 | dockerfile: Dockerfile.nginx |
||
46 | ports: |
||
47 | - "46301:46301" |
||
48 | - "51301:51301" |
||
49 | - "44909:22" |
||
50 | - "8090:8090" <------ Websocket port |
||
51 | |||
52 | 4. nginx config file adjustments, add following proxy: |
||
53 | location /ws { |
||
54 | proxy_pass http://mydomain:8090; |
||
55 | proxy_http_version 1.1; |
||
56 | proxy_set_header Upgrade $http_upgrade; |
||
57 | proxy_set_header Connection "upgrade"; |
||
58 | proxy_set_header Host $host; |
||
59 | } |
||
60 | |||
61 | 5 | Enis Nuredini | 5.(optional) If you upgrade your docker from an older version of ubuntu, your xdebug configuration may not work anymore. Adjustments are needed in the .ini file (99-math.ini), replace the existing xdebug configuration with this one: |
62 | 1 | Enis Nuredini | # New xdebug 3 version: |
63 | xdebug.mode = debug |
||
64 | xdebug.start_with_request = yes |
||
65 | xdebug.client_port = 51301 |
||
66 | xdebug.discover_client_host = 1 |
||
67 | xdebug.max_nesting_level = 400 |
||
68 | #xdebug.log=/var/log/apache2/xdebug.log |
||
69 | |||
70 | |||
71 | 6. Start/Restart (Build first time) the docker container. |
||
72 | |||
73 | 7. Set the configured websocket port and websocket url in QFQ Config, examples: |
||
74 | websocketPort: 8090 |
||
75 | websocketUrl: ws://mydomain:46301/ws |
||
76 | |||
77 | 8. If websocketPort is set in qfq config, the websocket server should start automatically the first time a web page with qfq content is loaded. |
||
78 | 12 | Enis Nuredini | </pre> |
79 | 11 | Enis Nuredini | |
80 | 13 | Enis Nuredini | 9. If you are upgrading the qfq extension (new with FE Chat) in an already existing project, then you need to add the new enum value *chat* to the column *type* from the *FormElement* table. |