Site Tools


aws-team:projects:aws-and-ci-cd-sample-project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aws-team:projects:aws-and-ci-cd-sample-project [2020/07/12 02:44] – created hajiraws-team:projects:aws-and-ci-cd-sample-project [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 19: Line 19:
  
 //Requirements//: //Requirements//:
-Nginx +  * Nginx 
-PHP >= 7.0 +  PHP >= 7.0 
-MySQL >= 5.7 +  MySQL >= 5.7 
-NPM +  NPM 
-Supervisor+  Supervisor 
 //Installation//: //Installation//:
 +
 1. Installed php modules must be: 1. Installed php modules must be:
 <html><div class="codeline"></html> <html><div class="codeline"></html>
Line 31: Line 33:
  
 2. Create a database and add a guideline of how to get DB credentials 2. Create a database and add a guideline of how to get DB credentials
 +
 3. Import a SQL file into the created DB 3. Import a SQL file into the created DB
 +
 4. In DB change the id to 3 in users table where the id is 1 4. In DB change the id to 3 in users table where the id is 1
 +
 5. Copy env variables file called .env from S3 or local storage. For the CI/CD sample project, please add secrets to GitHub for .env file 5. Copy env variables file called .env from S3 or local storage. For the CI/CD sample project, please add secrets to GitHub for .env file
 +
 6. Run (composer is not pre-installed): 6. Run (composer is not pre-installed):
  
 <html><div class="codeline"></html> <html><div class="codeline"></html>
-code@terminal:~$ composer install --optimize-autoloader+code@terminal:~$ composer install %%--%%optimize-autoloader
 <html></div></html> <html></div></html>
  
Line 44: Line 50:
 <html><div class="codeline"></html> <html><div class="codeline"></html>
 code@terminal:~$ php artisan key:generate code@terminal:~$ php artisan key:generate
 +
 code@terminal:~$ php artisan passport:install code@terminal:~$ php artisan passport:install
 +
 code@terminal:~$ php artisan storage:link code@terminal:~$ php artisan storage:link
 +
 code@terminal:~$ php artisan optimize:config code@terminal:~$ php artisan optimize:config
 +
 code@terminal:~$ npm install code@terminal:~$ npm install
 +
 code@terminal:~$ npm run production code@terminal:~$ npm run production
 <html></div></html> <html></div></html>
Line 55: Line 66:
 <html><div class="codeline"></html> <html><div class="codeline"></html>
 code@terminal:~$ sudo chgrp -R www-data storage bootstrap/cache code@terminal:~$ sudo chgrp -R www-data storage bootstrap/cache
 +
 code@terminal:~$ sudo chmod -R ug+rwx storage bootstrap/cache code@terminal:~$ sudo chmod -R ug+rwx storage bootstrap/cache
 <html></div></html> <html></div></html>
Line 61: Line 73:
  
 <html><div class="codeline"></html> <html><div class="codeline"></html>
-[program:laravel-worker-aws] +[program:laravel-worker-aws]   
-process_name=%(program_name)s_%(process_num)02d + 
-command=php /PATH_TO_PROJECT/artisan queue:work --tries=3 +process_name=%(program_name)s_%(process_num)02d   
-autostart=true + 
-autorestart=true +command=php /PATH_TO_PROJECT/artisan queue:work %%--%%tries=3   
-user=root + 
-numprocs=4 +autostart=true   
-redirect_stderr=true + 
-stdout_logfile=/PATH_TO_PROJECT/storage/logs/worker.log+autorestart=true   
 + 
 +user=root    
 + 
 +numprocs=4    
 + 
 +redirect_stderr=true    
 + 
 +stdout_logfile=/PATH_TO_PROJECT/storage/logs/worker.log    
 <html></div></html> <html></div></html>
  
Line 75: Line 96:
  
 <html><div class="codeline"></html> <html><div class="codeline"></html>
-* * * * * php /var/www/medvoice/artisan schedule:run >> /dev/null 2>&1+* * * * * php /var/www/PATH_TO_PROJECT/artisan schedule:run %%>>%% /dev/null 2>&1
 <html></div></html> <html></div></html>
  
 11. Setup SSL. We recommend AWS certificates instead of Let’s encrypt. 11. Setup SSL. We recommend AWS certificates instead of Let’s encrypt.
 +
 We also expect a guideline, written in markdown format, to setup and config our servers. We also expect a guideline, written in markdown format, to setup and config our servers.
  
aws-team/projects/aws-and-ci-cd-sample-project.1594543463.txt.gz · Last modified: 2020/07/12 01:44 (external edit)