User Tools

Site Tools


medal-data:system-setup

This is an old revision of the document!


Setup of medAL-data System

Purpose and scope

In this document, you will learn how to perform the basic setup of the MainData System.

Requirements

  • Server Linux =8gb ram
  • Storage= 300 gb
  • Operating System = ubuntu 18.04

Install Docker

  1. To update ubuntu server, type:
    sudo apt update
  2. Install a few prerequisite packages which let apt use packages over HTTPS by typing:
    sudo apt install apt-transport-https ca-certificates curl software-properties-common
  3. Add the GPG key for the official Docker repository to your system by typing:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  4. Add the Docker repository to APT sources:
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
  5. Update the package database with the Docker packages from the newly added repository:
    sudo apt update
  6. Make sure you are about to install from the Docker repository instead of the default Ubuntu repository:
    apt-cache policy docker-ce

    You will see an output like the following:

    docker-ce:
      Installed: (none)
      Candidate: <version-number>
      Version table:
        <version-number> 500
          500 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
  7. Finally, install Docker:
    sudo apt install docker-ce
  8. Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running:
    sudo systemctl status docker

For more information, you can check on this site (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04)

Install Nginx

  1. Install nginx:
    sudo apt install nginx
  2. Enable nginx in the firewall by typing:
    sudo ufw allow 'Nginx Full'

Install Dokku

  1. Install dokku
    wget https://raw.githubusercontent.com/dokku/dokku/v0.21.4/bootstrap.sh;
    sudo DOKKU_TAG=v0.21.4 bash bootstrap.sh
  2. Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings.
  3. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin.

Domain Setup

  1. On Your Server Terminal, set domain:
    sudo domains:set medal-data {{domain}}

    where domain is the domain for medAL-data.

Setting up letsencrypt with Dokku

  1. On your Server Terminal, install letsencrypt plugin with:
    sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
  2. Install certificate with
    sudo dokku letsencrypt medal-data
  3. Open your browser and test the system.

Creating an Admin

  1. On your server terminal, run:
    sudo dokku run medal-data php artisan tinker
  2. Type
    $user=new User;

    for a new user object

  3. Type
    $user->name=”{{user_name}}”;

    for the ADMIN name

  4. Type
    $user->email=”{{user_email}}”;

    for the ADMIN email

  5. Type
    $user->password=Hash::make(“{{user_password}}”);

    for the ADMIN password

  6. Type
    $user->syncRoles(“ADMIN”);

    To make this user an admin

  7. Try to access the web and log in with this user in the system.
medal-data/system-setup.1642427867.txt.gz · Last modified: 2022/01/17 14:57 by arnaudpoletto