Skip to content
On this page

Red Hat Enterprise Linux (Docker)

Prerequisites:

  1. Access to RHEL 7/8 local machine or development server as a non-root user with sudo privileges. If you’re using a remote server, we strongly suggest having an active firewall installed.
  2. Ensure that Docker is installed on your server. Please refer to the official guide at https://docs.docker.com/engine/install/rhel/.
  3. Docker Compose must be installed on your server. You can refer to this Guide to get that done: https://docs.docker.com/compose/install/

Installation of Red Hat Enterprise Linux (Docker)

Step 1: Clone Metro from the Source

Remember that an instance would have been provided by Orba when installing the Metro platform in your environment. However, if you need to clone the source, it can be done with the following steps.

$ mkdir /var/www/metro
$ cd /var/www/metro 
$ git clone https://github.com/metro-ipo/admin-dashboard

In most instances, Metro would be installed under the /var/www/ folder, for most Linux distributions.

Step 2: Verify Permissions

Please verify that your current user's UID matches with the given UID on the docker-compose.yml file in the application's root folder:

yaml
build:
      args:
        user: metro-user
        uid: 1000

If it doesn't match, update the compose.yml file before going ahead with step 3.

Hint:You can get the UID by running id command in the terminal.

NOTE: If you don't do this step correctly, then you may get an error on step 4.

Step 3: Setup docker containers

Change your current working directory and start containers using the commands given below:

bash
$ cd /var/www/metro/admin-dashboard
$ cp .env.example .env
$ docker-compose up -d

NOTE: Before running the setup script, double-check your .env file and ensure that the correct credentials are loaded, if you want to opt for the MySQL instance running on Docker, ensure that the credentials in the docker-compose.yml and .env are as following:

Database Host: `db`
Database Name: `metro`
Database Username: `metro`
Database Password: `metro`

Step 4: Install Composer Dependencies & Generate App Key

After the containers are built and started, run commands below to install composer dependencies & generate a unique application key:

$ docker-compose exec app composer config --global --auth github-oauth.github.com `INSERT_GITHUB_ACCESS TOKEN`
$ docker-compose exec app composer i --ignore-platform-reqs
$ docker-compose exec app php artisan migrate --seed
$ docker-compose exec app php artisan key:generate
$ docker-compose exec app php artisan jwt:secret
$ docker-compose exec app php artisan config:clear

Step 5: Complete installation

Open your web browser. Then, go to your given domain and access the default user account with the email and password below.

email: admin@admin
password: password