Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Additional hints for experts regarding optional configuration steps

Editing files in the docker container

It is dangerous to edit files directly in the docker container, since some are overwritten on updating the docker containers (with docker pull) or just updating translate5 itself.

Possible scenarios where this may be needed are described above.

If files must be edited in the docker container (like the installation.ini mentioned below) then there are basically two possibilities:

  1. go into the desired container and edit the file directly with the CLI editor vi :

    Code Block
    docker-compose exec php bash
    cd /var/www/translate5
    vi application/config/installation.ini


  2. copy the file out, edit it outside and copy it in again:

    Code Block
    # get the file from the container:
    docker-compose cp php:/var/www/translate5/application/config/installation.ini .
    
    # edit installation.ini with the tool you want
    
    # put the file back into the container:
    docker-compose cp installation.ini php:/var/www/translate5/application/config/installation.ini


E-Mailing

By default sending of E-Mails is disabled in translate5 directly in /var/www/translate5/application/config/installation.ini in the php docker container. 

  1. set runtimeOptions.sendMailDisabled = 0 in the installation.ini

...

  1. Add the SMTP configuration as described in Mail server as SMTP

SSL Configuration in the delivered nginx proxy

  • In the proxy container by default SSL is disabled.
  • In order to enable SSL several steps are needed:
    1. expose port 443 in docker-compose.production.yml

      Code Block
              ports:
                  # EXPOSE PORT 80 and 443
                  - "80:80"
                  - "443:443"


    2. Provide the certificate and key files in PEM format. The certificate file should also contain the intermediate files. See https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate

    3. Place that files on the host server
    4. Get the the ssl-server.conf template file from inside the docker container and place it beneath your docker-compose.yml files:
      docker-compose cp proxy:/etc/nginx/conf.d/ssl-server.conf nginx-server.conf
    5. Edit the nginx-server.conf locally, if needed.
    6. Mount that nginx-server.conf file and the certificate files into the docker container. So the default /etc/nginx/conf.d/server.conf is overwritten with the ssl one, and also the certificates are mounted into the container.

      Code Block
              volumes:
                  - /home/translate5/docker/nginx-server.conf:/etc/nginx/conf.d/server.conf
                  - /home/translate5/docker/certificate.cert:/etc/nginx/certificate.chain
                  - /home/translate5/docker/private.key:/etc/nginx/private.key


    7. Recreate the proxy container:

      Code Block
      docker-compose stop proxy
      docker-compose up -d proxy


Image Added

SSL Offloading

if you don't know what SSL offloading is, just do not read ahead.

SSL Offloading to an external load balancer is possible, the load balancer must support / enable websockets.

  1. Configure Translate5 as it would have SSL (runtimeOptions.server.protocol = https://) and run autodiscovery to configure messagebus correctly.
    Jump into the php container and call the autoconfiguration:

    Code Block
    docker-compose exec php bash
    t5 service:auto -a -s frontendmessagebus


  2. In the proxy container of translate5 modify /etc/nginx/conf.d/server.conf and duplicate the /ws/ location block with /wss/.
    Just do that like described in

The last step is needed since the /wss/ location block is normally in the ssl-server.conf which is not used since SSL is offloaded.

...