medal-data:system-setup
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| medal-data:system-setup [2022/01/17 14:45] – arnaudpoletto | medal-data:system-setup [2022/01/19 09:39] (current) – removed arnaudpoletto | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== 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 ===== | ||
| - | |||
| - | - To update ubuntu server, type: < | ||
| - | - Install a few prerequisite packages which let apt use packages over HTTPS by typing: < | ||
| - | - Add the GPG key for the official Docker repository to your system by typing: < | ||
| - | - Add the Docker repository to APT sources: < | ||
| - | - Update the package database with the Docker packages from the newly added repository: < | ||
| - | - 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:// | ||
| - | </ | ||
| - | - Finally, install Docker: < | ||
| - | - 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 ===== | ||
| - | |||
| - | - Install nginx: < | ||
| - | - Enable nginx in the firewall by typing: < | ||
| - | * Dokku | ||
| - | - Install dokku < | ||
| - | sudo DOKKU_TAG=v0.21.4 bash bootstrap.sh</ | ||
| - | - Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. | ||
| - | - 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. | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ===== Install medAL-data ===== | ||
| - | - Requirements | ||
| - | • You must have the MainData Project folder | ||
| - | • Git must be installed on your laptop | ||
| - | |||
| - | - Installation steps | ||
| - | 1. Open command prompt (for windows) or terminal (for Linux and Mac) | ||
| - | 2. Navigate to the MainData project folder (Parent Diretory). (Let’s call this user terminal) | ||
| - | 3. Open another terminal/ Command Prompt and log into the server as root (let’s call it Server terminal) | ||
| - | 4. On the Server terminal, create an app by “ ” | ||
| - | 5. Specify the web server type that will be running “echo 'web: vendor/ | ||
| - | 6. On you user terminal, | ||
| - | 7. Add the project to git “git add. /” | ||
| - | 8. Connect local git with the domain “git remote add dokku dokku@your_domain: | ||
| - | 9. Commit to git “git commit -m " | ||
| - | 10. For the registration of the app on dokku Server, copy the value of APP_KEY variable in the .env file located in the root directory of your Laravel Project. Then, login to your VPS and register the APP_KEY environmental variable for your app “dokku config:set blog APP_KEY={{ key }}”.Replace key with the actual APP_KEY | ||
| - | 11. Push the application on dokku with “git push dokku master” | ||
| - | 12. Install the postgres plugin “sudo dokku plugin: | ||
| - | 13. Create database “dokku mysql: | ||
| - | 14. Link database service to our application “dokku mysql:link main-data-Db Main-Data” | ||
| - | 15. Type “dokku mysql:info blogdb –dsn” and obtain the value from that and type in “dokku config:set blog DATABASE_URL={{ value }}” with value as the value above | ||
| - | 16. go back to your application on local, and modify the config/ | ||
| - | |||
| - | 17. on the user terminal “git add ./” | ||
| - | 18. commit “git commit -m " | ||
| - | 19. push the commit “git push dokku master” | ||
| - | 20. finally migrate the database “dokku run Main-Data php artisan migrate” | ||
| - | 6. Domain set up | ||
| - | 1. On Your Server Terminal | ||
| - | 2. Set domain “sudo domains:set Main-Data {{domain}}” where domain is the domain for MainData | ||
| - | - Setting up letsencrypt with Dokku | ||
| - | 1. On your Server Terminal.Install letsencrypt plugin with “sudo dokku plugin: | ||
| - | 2. Install certificate with “sudo dokku letsencrypt Main-Data” | ||
| - | 3. Open your browser and test the system | ||
| - | - Creating an Admin | ||
| - | 1. On your server terminal “sudo dokku run Main-Data php artisan tinker” | ||
| - | 2. Type “$user=new User;” for a new user object | ||
| - | 3. Type “$user-> | ||
| - | 4. Type “$user-> | ||
| - | 5. Type “$user-> | ||
| - | 6. Type “$user-> | ||
| - | 7. Try to access the web and log in with this user in the system | ||
| - | |||
| - | Administrative information | ||
| - | |||
| - | Name Signature Date | ||
| - | Author Ibrahim Evans 12.11.2020 | ||
| - | Revised by | ||
| - | Approved by | ||
| - | |||
| - | |||
| - | Document change control: | ||
| - | Version Changes Name Date | ||
| - | 01 New Document Ibrahim Evans 12.11.2020 | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | Distribution of SOP: | ||
| - | Name Role Health facility / Institute Date | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | *Note: When printing and distributing the SOP, the administrative information page does not need to be included. | ||
| - | |||
| - | |||
medal-data/system-setup.1642427101.txt.gz · Last modified: 2022/01/17 14:45 by arnaudpoletto
