B-Translator is made of two parts, a client application and a server application, which communicate with each-other through an HTTP API. Both of these applications are built with Drupal7. For more flexibility, there is also a drupal module for the client, that can be installed independently on any Drupal application or distribution.

Installation is done inside a Docker container. For instructions about installing Docker see: https://docs.docker.com/installation/

Installing btr_client

  1. Get the image of the system:
    docker search btranslator
    docker pull btranslator/btr_client:v3.0
  2. Create a container:
    ### create a container
    docker create --name=btr_client --hostname=example.org \
        -p 80:80 -p 443:443 --restart=always \
        btranslator/btr_client:v3.0
    
    ### start the container
    docker start btr_client
  3. Change the configuration:
    ### enter the shell of the container
    alias docker-exec='docker exec -it btr_client env TERM=xterm'
    docker-exec bash
    
    ### modify the configration settings
    cp install/settings.sh btr_client.conf
    vim btr_client.conf
    
    ### change the configuration
    install/config.sh btr_client.conf
    
    ### restart the container
    exit
    docker restart btr_client
  4. If this is a test installation or you are installing it on your local machine, add to /etc/hosts a line like this 127.0.0.1 example.org with the domain that you used in configuration and the IP of the server. Now you can open in browser https://example.org and access the application. You will have to confirm the security exception, since the SSL certificates of the web server are not real ones.
  5. Make more configuration changes:
    ### change the domain
    docker-exec install/config/domain.sh
    
    ### change the translation language
    docker-exec install/config/translation_lng.sh
    
    ### change drupal admin password
    docker-exec install/config/drupalpass.sh
    
    ### change the gmail account
    docker-exec install/config/gmailsmtp.sh
    
    ### change the oauth2 login settings
    docker-exec install/config/oauth2_login.sh

Installing btr_server

  1. Get the image of the system:
    docker search btranslator
    docker pull btranslator/btr_server:v3.0
  2. Create a container:
    mkdir -p /docker/{PO_files,downloads}
    
    ### create a container
    docker create --name=btr_server --hostname=example.org \
        -v /docker/PO_files:/var/www/PO_files \
        -v /docker/downloads:/var/www/downloads \
        -p 80:80 -p 443:443 --restart=always \
        btranslator/btr_server:v3.0
    
    ### start the container
    docker start btr_server
  3. Change the configuration:
    ### enter the shell of the container
    alias docker-exec='docker exec -it btr_server env TERM=xterm'
    docker-exec bash
    
    ### modify the configration settings
    cp install/settings.sh btr_server.conf
    vim btr_server.conf
    
    ### change the configuration
    install/config.sh btr_server.conf
    
    ### restart the container
    exit
    docker restart btr_server
  4. Make more configuration changes:
    ### change the domain
    docker-exec install/config/domain.sh
    
    ### change the supported languages
    docker-exec install/config/languages.sh
    
    ### change drupal admin password
    docker-exec install/config/drupalpass.sh
    
    ### change the gmail account
    docker-exec install/config/gmailsmtp.sh
  5. Download and import PO files:
    ### get the PO files (takes a long time)
    docker-exec /var/www/data/get.sh
    docker-exec tail -f /var/www/data/nohup-get.out
    docker-exec less -r /var/www/data/nohup-get.out
    
    ### import them (takes many hours and maybe days)
    docker-exec /var/www/data/import.sh
    docker-exec tail -f /var/www/data/nohup-import.out
    docker-exec less -r /var/www/data/nohup-import.out