Appearance
Ubuntu (Docker)
Prerequisites;
- Access to an Ubuntu 18.04 local machine or development server as a non-root user with sudo privileges. NOTE: If you’re using a remote server, we strongly suggest having an active firewall installed. To set these up, please refer to this guide Initial Server Setup Guide for Ubuntu 18.04 on Digital Ocean.
- Ensure Docker is installed on your server, following Steps 1 and 2 of How To Install and Use Docker on Ubuntu 18.04.
- Docker Compose must be installed on your server. You can refer to this Guide: How To Install Docker Compose on Ubuntu 18.04.
The Ubuntu (Docker) Installation Process
Step 1: Clone Metro from the Source
Normally, an instance would have been provided by Orba when installing the Metro platform in your environment. however, in extraordinary cases where 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
NOTE: 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 this is not done 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 given commands below:
bash
$ cd /var/www/metro/admin-dashboard
$ cp .env.example .env
$ docker-compose up -d
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 the 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, we can now run the 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 following email and password.
email: admin@admin
password: password
That's it !
Now let's go through the steps to Install Red Hat Enterprise Linux ( Docker).