Project

General

Profile

Upgrade 2204 » History » Version 12

Enis Nuredini, 01.01.2024 11:59

1 2 Enis Nuredini
h1. Docker Upgrade - Ubuntu 22-04
2 1 Enis Nuredini
3
h2. New docker container
4
5 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. 
6 1 Enis Nuredini
How to clone the specific branch:
7
<pre>
8
git clone -b ubuntu22 https://git.math.uzh.ch/typo3/typo3-docker.git
9
</pre>
10
11
h2. Upgrading existing docker
12
13 10 Enis Nuredini
Manual to upgrade an existing docker container and setting up websocket server.
14 7 Enis Nuredini
15 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.
16 1 Enis Nuredini
<pre>
17
1. At least Ubuntu 22.04 needs to be installed in docker container. (Usually done inside Dockerfile.nginx):
18
FROM ubuntu:22.04
19
20
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:
21
ENV DEBIAN_FRONTEND=noninteractive
22
RUN apt-get update && \
23
    apt-get install -y tzdata && \
24
    ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \
25
    dpkg-reconfigure --frontend noninteractive tzdata
26
27
28 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:
29 1 Enis Nuredini
# Manually install libssl1.1
30
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
31
RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
32
33 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: 
34 1 Enis Nuredini
EXPOSE 8090
35
CMD service php8.1-fpm start && service ssh start && nginx
36
37
38
3. Add new websocket port (8090) to nginx webserver in Dockerfile, example:
39
  nginx:
40
    image: webserver
41
    build: 
42
      dockerfile: Dockerfile.nginx
43
    ports:
44
      - "46301:46301"
45
      - "51301:51301"
46
      - "44909:22"
47
      - "8090:8090"         <------ Websocket port
48
49
4. nginx config file adjustments, add following proxy:
50
	location /ws {
51
        proxy_pass http://mydomain:8090;
52
        proxy_http_version 1.1;
53
        proxy_set_header Upgrade $http_upgrade;
54
        proxy_set_header Connection "upgrade";
55
        proxy_set_header Host $host;
56
    }
57
58 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:
59 1 Enis Nuredini
# New xdebug 3 version:
60
xdebug.mode = debug
61
xdebug.start_with_request = yes
62
xdebug.client_port = 51301
63
xdebug.discover_client_host = 1
64
xdebug.max_nesting_level = 400
65
#xdebug.log=/var/log/apache2/xdebug.log
66
67
68
6. Start/Restart (Build first time) the docker container.
69
70
7. Set the configured websocket port and websocket url in QFQ Config, examples:
71
websocketPort: 8090
72
websocketUrl: ws://mydomain:46301/ws
73
74
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.
75 12 Enis Nuredini
</pre>
76 11 Enis Nuredini
77 1 Enis Nuredini
9. If you upgrade the qfq extension (new with FE Chat) in a already existing project then you need to add the new enum value *chat* into the column *type* from table *FormElement* .