Upgrade 2204 » History » Version 1
Enis Nuredini, 31.12.2023 14:38
1 | 1 | Enis Nuredini | h1. Docker Upgrade 22-04 |
---|---|---|---|
2 | |||
3 | h2. New docker container |
||
4 | |||
5 | It is recommended to create a new docker container with the new Typo3 Docker branch *ubuntu22* instead of upgrading an existing one. |
||
6 | 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 | Manual to upgrade an existing Docker Container and setting up websocket server: |
||
14 | <pre> |
||
15 | 1. At least Ubuntu 22.04 needs to be installed in docker container. (Usually done inside Dockerfile.nginx): |
||
16 | FROM ubuntu:22.04 |
||
17 | |||
18 | 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: |
||
19 | ENV DEBIAN_FRONTEND=noninteractive |
||
20 | RUN apt-get update && \ |
||
21 | apt-get install -y tzdata && \ |
||
22 | ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \ |
||
23 | dpkg-reconfigure --frontend noninteractive tzdata |
||
24 | |||
25 | |||
26 | 1.2(optional) If you are using wkhtmltopdf, 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: |
||
27 | # Manually install libssl1.1 |
||
28 | RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
||
29 | RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
||
30 | |||
31 | 2. Expose the websocket port in the dockerfile (Dockerfile.nginx), it should be added before the services start, example: |
||
32 | EXPOSE 8090 |
||
33 | CMD service php8.1-fpm start && service ssh start && nginx |
||
34 | |||
35 | |||
36 | 3. Add new websocket port (8090) to nginx webserver in Dockerfile, example: |
||
37 | nginx: |
||
38 | image: webserver |
||
39 | build: |
||
40 | dockerfile: Dockerfile.nginx |
||
41 | ports: |
||
42 | - "46301:46301" |
||
43 | - "51301:51301" |
||
44 | - "44909:22" |
||
45 | - "8090:8090" <------ Websocket port |
||
46 | |||
47 | 4. nginx config file adjustments, add following proxy: |
||
48 | location /ws { |
||
49 | proxy_pass http://mydomain:8090; |
||
50 | proxy_http_version 1.1; |
||
51 | proxy_set_header Upgrade $http_upgrade; |
||
52 | proxy_set_header Connection "upgrade"; |
||
53 | proxy_set_header Host $host; |
||
54 | } |
||
55 | |||
56 | 5.(optional) If you upgrade your docker from an older ubuntu version then your xdebug configuration maybe will not work anymore. Adjustments in .ini file are needed (99-math.ini), replace the existing xdebug configuration with this: |
||
57 | # New xdebug 3 version: |
||
58 | xdebug.mode = debug |
||
59 | xdebug.start_with_request = yes |
||
60 | xdebug.client_port = 51301 |
||
61 | xdebug.discover_client_host = 1 |
||
62 | xdebug.max_nesting_level = 400 |
||
63 | #xdebug.log=/var/log/apache2/xdebug.log |
||
64 | |||
65 | |||
66 | 6. Start/Restart (Build first time) the docker container. |
||
67 | |||
68 | 7. Set the configured websocket port and websocket url in QFQ Config, examples: |
||
69 | websocketPort: 8090 |
||
70 | websocketUrl: ws://mydomain:46301/ws |
||
71 | |||
72 | 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. |
||
73 | </pre> |