eMedia Installation

Using Docker to run eMedia has a number of advantages including:

  • Ability to run on all major OS's such as Ubuntu, CentOs or RedHat with consistent behavior.
  • Separation of data vs application. Keeps your backups clean.
  • Ability to run a cluster with multiple docker nodes

Follow the instructions on how to install Docker and run the entermedia-docker deployment script in your specific server environment: Mac or Linux (Ubuntu and RedHat-based Distributions).

eMedia deploy script

Download and run our entermedia-docker deploy script:

curl -o entermedia-docker.sh -jL get-em11.entermediadb.org 
sudo bash ./entermedia-docker.sh xyzcorp 100

eMedia first steps

By defaul eMedia will be stored in your host computer: /media/emsites/xyzcorp

The deployment process creates a set of bash scripts to manage your instance for tasks like start, stop, restart, see logs and update, they can be found in /media/emsites/xyzcorp/100/

 

Update to most recent version (Currently 11 version)

You can upgrade to the dev builds of eMedia by running the update script provided by the Deployment process.

cd /media/emsites/xyzcorp/100
sudo ./updatedev.sh

 

Rebuild a eMedia docker instance

To rebuild the docker instance you can run the entermedia-docker.sh script using same instance name and port you started with: 

cd /media/emsites/xyzcorp/100
sudo ./entermedia-docker.sh xyzcorp 100

 

Setup NGINX as Proxy Forward and Load Balancer

Once you have installed and running Nginx latest version you need to add a configuration file for your instance to respond to external access.

 $ sudo vi /etc/nginx/conf.d/entermedia.conf

Use this base configuration to respond to any specific domain you own:

(Don't forget to point your domain or sub-domain DNS records to the server you installed eMedia)

 server {
  server_name  emedia.mydomain.com;
  listen 443 ssl;
  ssl_certificate /etc/letsencrypt/live/emedia.mydomain.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/emedia.mydomain.com/privkey.pem;

  location / {

    proxy_read_timeout 1200s;
    proxy_send_timeout 1200s;
    proxy_connect_timeout 1200s;
    proxy_max_temp_file_size 2048m;
    client_max_body_size 100G;
    keepalive_timeout 10s;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Host $host:$server_port;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-SiteRoot https://$http_host;
    proxy_pass http://emedia01;
  }
}

server {
    listen 80;
    server_name emedia.mydomain.com;
    return 301 https://$host$request_uri;
}

upstream emedia01 {
  ip_hash;
  server  172.18.0.101:8080;
}

  • Match (emedia.mydomain.com) to your custom domain.
  • Match the upstream server IP (172.18.0.101:8080) to your eMedia instance local IP, for default configuration IP ends with the node you used in your deploy script.
  • We highly recommend to use eMedia within the HTTPS scheme, you can easily get a SSL Certificate with Let's Encrypt Authority.

Validate your nginx configuration and restart the service:

sudo nginx -s reload

 

You should be able to access your eMedia installation in any Web Browser now.