Arquivo da tag: Deploy

RubyOnRails – Deploy

https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma
bundle exec cap -T
cap bundler:install                               # Install the current Bundler environment
cap bundler:map_bins                         # Maps all binaries to use `bundle exec` by default
cap deploy                                           # Deploy a new release
cap deploy:check                                # Check required files and directories exist
cap deploy:check:directories              # Check shared and release directories exist
cap deploy:check:linked_dirs             # Check directories to be linked exist in shared
cap deploy:check:linked_files      # Check files to be linked exist in shared
cap deploy:check:make_linked_dirs  # Check directories of files to be linked exist in shared
cap deploy:check_revision          # Make sure local git is in sync with remote
cap deploy:cleanup                 # Clean up old releases
cap deploy:cleanup_assets          # Cleanup expired assets
cap deploy:cleanup_rollback        # Remove and archive rolled-back release
cap deploy:clobber_assets          # Clobber assets
cap deploy:compile_assets          # Compile assets
cap deploy:finished                # Finished
cap deploy:finishing               # Finish the deployment, clean up server(s)
cap deploy:finishing_rollback      # Finish the rollback, clean up server(s)
cap deploy:initial                 # Initial Deploy
cap deploy:log_revision            # Log details of the deploy
cap deploy:migrate                 # Runs rake db:migrate if migrations are set
cap deploy:migrating               # Runs rake db:migrate
cap deploy:normalize_assets        # Normalize asset timestamps
cap deploy:published               # Published
cap deploy:publishing              # Publish the release
cap deploy:restart                 # Restart application
cap deploy:revert_release          # Revert to previous release timestamp
cap deploy:reverted                # Reverted
cap deploy:reverting               # Revert server(s) to previous release
cap deploy:rollback                # Rollback to previous release
cap deploy:rollback_assets         # Rollback assets
cap deploy:set_current_revision    # Place a REVISION file with the current revision SHA in the current release path
cap deploy:started                 # Started
cap deploy:starting                # Start a deployment, make sure server(s) ready
cap deploy:symlink:linked_dirs     # Symlink linked directories
cap deploy:symlink:linked_files    # Symlink linked files
cap deploy:symlink:release         # Symlink release to current
cap deploy:symlink:shared          # Symlink files and directories from shared to release
cap deploy:updated                 # Updated
cap deploy:updating                # Update server(s) by setting up a new release
cap install                        # Install Capistrano, cap install STAGES=staging,production
cap puma:config                    # Setup Puma config file
cap puma:halt                      # halt puma
cap puma:make_dirs                 # Create Directories for Puma Pids and Socket
cap puma:phased-restart            # phased-restart puma
cap puma:restart                   # restart puma
cap puma:start                     # Start puma
cap puma:status                    # status puma
cap puma:stop                      # stop puma
cap rvm:check                      # Prints the RVM and Ruby version on the target host

Deploy – How to Install Laravel with an Nginx Web Server on Ubuntu 18.04

Install the Backend Components

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install nginx git php7.3-fpm php7.3-mysql php7.3-mcrypt

Modify the PHP Configuration

sudo nano /etc/php/7.3/fpm/php.ini

Mudar a linha que tem:

;cgi.fix_pathinfo=1

para

cgi.fix_pathinfo=0

sudo service php7.3-fpm restart

Configure Nginx and the Web Root

sudo mkdir -p /var/www/laravel

sudo nano /etc/nginx/sites-available/default

Deve ficar assim:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /var/www/laravel/public;
    index index.php index.html index.htm;

    server_name server_domain_or_IP;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Depois sai do arquivo e executa:

sudo service nginx restart

Install Composer and Laravel

cd ~
curl -sS https://getcomposer.org/installer | php

sudo mv composer.phar /usr/local/bin/composer

sudo composer create-project laravel/laravel /var/www/laravel

sudo composer create-project laravel/laravel /var/www/laravel 5.8

sudo chown -R :www-data /var/www/laravel

sudo chmod -R 775 /var/www/laravel/storage
http://server_domain_or_IP

Link de referência: https://www.digitalocean.com/community/tutorials/how-to-install-laravel-with-an-nginx-web-server-on-ubuntu-14-04