medal-data:setup
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| medal-data:setup [2022/01/14 09:15] – arnaudpoletto | medal-data:setup [2022/01/19 11:46] (current) – arnaudpoletto | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== medAL-data Setup ====== | ====== medAL-data Setup ====== | ||
| - | ==== Purpose and Scope ==== | + | ===== Purpose and Scope ===== |
| This page lists instructions to setup a medAL-// | This page lists instructions to setup a medAL-// | ||
| Line 8: | Line 8: | ||
| - | ==== Material ==== | + | ===== Material |
| You will need the following material: | You will need the following material: | ||
| Line 24: | Line 24: | ||
| - | ===== Manual Installation ===== | + | ===== Environment Setup ===== |
| - | + | ||
| - | ==== Environment Setup ==== | + | |
| Firstly, open up two terminals **[t_local]** and **[t_remote]** on the controlling workstation, | Firstly, open up two terminals **[t_local]** and **[t_remote]** on the controlling workstation, | ||
| < | < | ||
| + | |||
| + | |||
| + | |||
| + | ==== Install Docker ==== | ||
| + | |||
| + | To setup Docker on the remote server, follow this procedure: | ||
| + | |||
| + | - **[t_remote]** To update ubuntu server, type: < | ||
| + | - **[t_remote]** Install a few prerequisite packages which let apt use packages over HTTPS by typing: < | ||
| + | - **[t_remote]** Add the GPG key for the official Docker repository to your system by typing: < | ||
| + | - **[t_remote]** Add the Docker repository to APT sources: < | ||
| + | - **[t_remote]** Update the package database with the Docker packages from the newly added repository: < | ||
| + | - **[t_remote]** Make sure you are about to install from the Docker repository instead of the default Ubuntu repository: < | ||
| + | docker-ce: | ||
| + | Installed: (none) | ||
| + | Candidate: < | ||
| + | Version table: | ||
| + | < | ||
| + | 500 https:// | ||
| + | </ | ||
| + | - **[t_remote]** Finally, install Docker: < | ||
| + | - **[t_remote]** Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running: < | ||
| + | For more information, | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Install Nginx ==== | ||
| + | |||
| + | To setup Nginx on the remote server, follow these steps: | ||
| + | |||
| + | - **[t_remote]** Install nginx: < | ||
| + | - **[t_remote]** Enable nginx in the firewall by typing: < | ||
| - | === Dokku Installation on Remote Server | + | ==== Install |
| - | To setup the dokku installation, follow these steps: | + | To setup Dokku on the remote server, follow these steps: |
| - **[t_remote]** Install dokku with the following commands: \\ < | - **[t_remote]** Install dokku with the following commands: \\ < | ||
| wget https:// | wget https:// | ||
| - | sudo DOKKU_TAG=v0.24.10 bash bootstrap.sh | + | sudo DOKKU_TAG=v0.24.10 bash bootstrap.sh </ |
| - | </ | + | |
| - **[t_local]** On the local workstation, | - **[t_local]** On the local workstation, | ||
| - | | + | |
| cat ~/ | cat ~/ | ||
| </ | </ | ||
| ssh-keygen -t rsa | ssh-keygen -t rsa | ||
| </ | </ | ||
| - | | + | |
| - | |||
| - | ==== Application Setup ==== | ||
| === Application Deployment === | === Application Deployment === | ||
| Line 88: | Line 115: | ||
| git clone https:// | git clone https:// | ||
| cd liwi-main-data </ | cd liwi-main-data </ | ||
| - | - **[t_local]** Do a copy the '' | + | - **[t_local]** Do a copy the '' |
| - | cp dokku.env.example | + | cp .env.dokku.example |
| + | sudo nano .env.dokku </ | ||
| + | - **[t_remote]** Copy the file content to your clipboard. | ||
| - **[t_remote]** On the remote server, paste the content at the end of the following file: ''/ | - **[t_remote]** On the remote server, paste the content at the end of the following file: ''/ | ||
| - **[t_local]** Link and deploy the server with the following git commands (replace // | - **[t_local]** Link and deploy the server with the following git commands (replace // | ||
| Line 103: | Line 132: | ||
| - Make sure that to setup the ther environment variables properly in your '' | - Make sure that to setup the ther environment variables properly in your '' | ||
| - Refresh the configuration: | - Refresh the configuration: | ||
| - | dokku run medal-data php artisan config: | + | dokku run medal-data php artisan config: |
| - **[t_remote]** Finally, migrate and seed the database using: \\ < | - **[t_remote]** Finally, migrate and seed the database using: \\ < | ||
| dokku run medal-data php artisan migrate: | dokku run medal-data php artisan migrate: | ||
| Line 110: | Line 139: | ||
| dokku run medal-data php artisan 2fa: | dokku run medal-data php artisan 2fa: | ||
| </ | </ | ||
| + | |||
| + | - **[t_remote]** If you need to export existing data from medal-// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Domain Setup ===== | ||
| + | |||
| + | - **[t_remote]** On your server terminal, set domain: < | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Setting up letsencrypt with Dokku ===== | ||
| + | - **[t_remote]** On your server terminal, install letsencrypt plugin with: < | ||
| + | - **[t_remote]** Install certificate with < | ||
| + | - **[t_remote]** Restart the server: < | ||
| + | - Open your browser and test the system. Make sure to setup the Two-factor authentication before logging in. You should be able to login with the admin credentials using the email address // | ||
medal-data/setup.1642148120.txt.gz · Last modified: 2022/01/14 09:15 by arnaudpoletto
