Upgrade 2204 » History » Version 17
Enis Nuredini, 11.01.2024 14:53
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 | 17 | Enis Nuredini | Upgrading from T3 V10 to V11 - keeping pages and tt_content. Use following querys to select the T3 V11 compatible columns and export them for your new T3 instance: |
15 | <pre> |
||
16 | SELECT uid, pid, tstamp, crdate, cruser_id, deleted, hidden, starttime, endtime, |
||
17 | fe_group, sorting, rowDescription, editlock, sys_language_uid, l10n_parent, |
||
18 | l10n_source, l10n_state, t3_origuid, l10n_diffsource, t3ver_oid, t3ver_wsid, |
||
19 | t3ver_state, t3ver_stage, perms_userid, perms_groupid, perms_user, perms_group, |
||
20 | perms_everybody, title, slug, doktype, TSconfig, is_siteroot, php_tree_stop, url, |
||
21 | shortcut, shortcut_mode, subtitle, layout, target, media, lastUpdated, keywords, |
||
22 | cache_timeout, cache_tags, newUntil, description, no_search, SYS_LASTCHANGED, |
||
23 | abstract, module, extendToSubpages, author, author_email, nav_title, nav_hide, |
||
24 | content_from_pid, mount_pid, mount_pid_ol, l18n_cfg, fe_login_mode, backend_layout, |
||
25 | backend_layout_next_level, tsconfig_includes, categories FROM pages; |
||
26 | |||
27 | SELECT uid, rowDescription, pid, tstamp, crdate, cruser_id, deleted, hidden, |
||
28 | starttime, endtime, fe_group, sorting, editlock, sys_language_uid, |
||
29 | l18n_parent, l10n_source, l10n_state, t3_origuid, l18n_diffsource, |
||
30 | t3ver_oid, t3ver_wsid, t3ver_state, t3ver_stage, CType, header, |
||
31 | header_position, bodytext, bullets_type, uploads_description, |
||
32 | uploads_type, assets, image, imagewidth, imageorient, imagecols, |
||
33 | imageborder, media, layout, frame_class, cols, space_before_class, |
||
34 | space_after_class, records, pages, colPos, subheader, header_link, |
||
35 | image_zoom, header_layout, list_type, sectionIndex, linkToTop, |
||
36 | file_collections, filelink_size, filelink_sorting, |
||
37 | filelink_sorting_direction, target, date, `recursive`, imageheight, |
||
38 | pi_flexform, accessibility_title, accessibility_bypass, |
||
39 | accessibility_bypass_text, selected_categories, category_field, |
||
40 | table_class, table_caption, table_delimiter, table_enclosure, |
||
41 | table_header_position, table_tfoot, categories FROM tt_content; |
||
42 | </pre> |
||
43 | |||
44 | 1 | Enis Nuredini | h2. Upgrading existing docker |
45 | |||
46 | 10 | Enis Nuredini | Manual to upgrade an existing docker container and setting up websocket server. |
47 | 7 | Enis Nuredini | |
48 | 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. |
49 | 1 | Enis Nuredini | <pre> |
50 | 1. At least Ubuntu 22.04 needs to be installed in docker container. (Usually done inside Dockerfile.nginx): |
||
51 | FROM ubuntu:22.04 |
||
52 | |||
53 | 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: |
||
54 | ENV DEBIAN_FRONTEND=noninteractive |
||
55 | RUN apt-get update && \ |
||
56 | apt-get install -y tzdata && \ |
||
57 | ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \ |
||
58 | dpkg-reconfigure --frontend noninteractive tzdata |
||
59 | |||
60 | |||
61 | 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: |
62 | 1 | Enis Nuredini | # Manually install libssl1.1 |
63 | RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
||
64 | RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
||
65 | |||
66 | 15 | Enis Nuredini | 1.3 Change all path entries which has *7.4* to *8.1* in files Dockerfile.nginx, docker-compose.yml and default.conf (docker/sites-available/) |
67 | |||
68 | 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: |
69 | 1 | Enis Nuredini | EXPOSE 8090 |
70 | CMD service php8.1-fpm start && service ssh start && nginx |
||
71 | |||
72 | |||
73 | 3. Add new websocket port (8090) to nginx webserver in Dockerfile, example: |
||
74 | nginx: |
||
75 | image: webserver |
||
76 | build: |
||
77 | dockerfile: Dockerfile.nginx |
||
78 | ports: |
||
79 | - "46301:46301" |
||
80 | - "51301:51301" |
||
81 | - "44909:22" |
||
82 | - "8090:8090" <------ Websocket port |
||
83 | |||
84 | 4. nginx config file adjustments, add following proxy: |
||
85 | location /ws { |
||
86 | proxy_pass http://mydomain:8090; |
||
87 | proxy_http_version 1.1; |
||
88 | proxy_set_header Upgrade $http_upgrade; |
||
89 | proxy_set_header Connection "upgrade"; |
||
90 | proxy_set_header Host $host; |
||
91 | } |
||
92 | |||
93 | 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: |
94 | 1 | Enis Nuredini | # New xdebug 3 version: |
95 | xdebug.mode = debug |
||
96 | xdebug.start_with_request = yes |
||
97 | 16 | Enis Nuredini | xdebug.client_port = 51301 <------------- Here should stay your xDebug port! |
98 | 1 | Enis Nuredini | xdebug.discover_client_host = 1 |
99 | xdebug.max_nesting_level = 400 |
||
100 | #xdebug.log=/var/log/apache2/xdebug.log |
||
101 | |||
102 | |||
103 | 6. Start/Restart (Build first time) the docker container. |
||
104 | |||
105 | 7. Set the configured websocket port and websocket url in QFQ Config, examples: |
||
106 | websocketPort: 8090 |
||
107 | websocketUrl: ws://mydomain:46301/ws |
||
108 | |||
109 | 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. |
||
110 | 12 | Enis Nuredini | </pre> |
111 | 11 | Enis Nuredini | |
112 | 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. |