This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

ldiascarmo650
ldiascarmo650

I have used wizard installation with sqliteDB. The first problem that i had was where i gonna put the sqlite file??

  • i create a folder on root called database and use the full path declared on yaml file. (the folder is correct?)

I'm not able to access the backend area. =/ The frontend area can't load the assets files. And every link that i click on front end area go 404, those link are not been load with the port number defined on homestead, or can be a missing ngix config

Little context i work with cakephp for a long time and now i wanna try something different like laravel

Sorry for my poor english

http://laravel.com/docs/homestead?version=4.2

daftspunky
daftspunky

Have a look at this walkthrough, it appears to be a successful usage of Homestead:

http://erikaybar.name/octobercms-my-first-encounter/

Glower
Glower

I tried to adapt Laravel Homestead library for October CMS. But it is not flexible for customization. The only way is to use after.sh file and hardcode new nginx configuration for your particular website there using documentation: https://octobercms.com/docs/setup/configuration

Or to create your own box without Homestead.

Lewis-H
Lewis-H

Follow this article it might help you! https://github.com/laravel/homestead/issues/543 Regards, Lewis

Glower
Glower

Homestead and October CMS

Homestead is appropriate for OctoberCMS. But OctoberCMS doesn't use public folder by default, as Laravel does. The simplest way is to use october:mirror for creating symlinks to public folder.

  1. Add to .gitignore:

    .vagrant
    /public
  2. Add to after.sh:

    cd code
    php artisan october:mirror public/
  3. Add new configuration files for homestead:

    config/homestead/database.php

        <?php
    
        return [
    
            /*
            |--------------------------------------------------------------------------
            | PDO Fetch Style
            |--------------------------------------------------------------------------
            |
            | By default, database results will be returned as instances of the PHP
            | stdClass object; however, you may desire to retrieve records in an
            | array format for simplicity. Here you can tweak the fetch style.
            |
            */
    
            'fetch' => PDO::FETCH_CLASS,
    
            /*
            |--------------------------------------------------------------------------
            | Default Database Connection Name
            |--------------------------------------------------------------------------
            |
            | Here you may specify which of the database connections below you wish
            | to use as your default connection for all database work. Of course
            | you may use many connections at once using the Database library.
            |
            */
    
            'default' => env('DB_CONNECTION', 'mysql'),
    
            /*
            |--------------------------------------------------------------------------
            | Database Connections
            |--------------------------------------------------------------------------
            |
            | Here are each of the database connections setup for your application.
            | Of course, examples of configuring each database platform that is
            | supported by Laravel is shown below to make development simple.
            |
            |
            | All database work in Laravel is done through the PHP PDO facilities
            | so make sure you have the driver for your particular database of
            | choice installed on your machine before you begin development.
            |
            */
    
            'connections' => [
    
                'sqlite' => [
                    'driver'   => 'sqlite',
                    'database' => 'storage/database.sqlite',
                    'prefix'   => '',
                ],
    
                'mysql' => [
                    'driver'     => 'mysql',
                    'engine'     => 'InnoDB',
                    'host' => 'localhost',
                    'port' => 3306,
                    'database' => 'homestead',
                    'username' => 'homestead',
                    'password' => 'secret',
                    'charset'    => 'utf8mb4',
                    'collation'  => 'utf8mb4_unicode_ci',
                    'prefix'     => '',
                    'varcharmax' => 191,
                ],
    
                'pgsql' => [
                    'driver'   => 'pgsql',
                    'host' => 'localhost',
                    'port' => 5432,
                    'database' => 'homestead',
                    'username' => 'homestead',
                    'password' => 'secret',
                    'charset'  => 'utf8',
                    'prefix'   => '',
                    'schema'   => 'public',
                ],
    
                'sqlsrv' => [
                    'driver'   => 'sqlsrv',
                    'host' => 'localhost',
                    'port' => 5432,
                    'database' => 'homestead',
                    'username' => 'homestead',
                    'password' => 'secret',
                    'prefix'   => '',
                ],
    
            ],
    
            /*
            |--------------------------------------------------------------------------
            | Migration Repository Table
            |--------------------------------------------------------------------------
            |
            | This table keeps track of all the migrations that have already run for
            | your application. Using this information, we can determine which of
            | the migrations on disk have not actually be run in the databases.
            |
            */
    
            'migrations' => 'migrations',
    
            /*
            |--------------------------------------------------------------------------
            | Redis Databases
            |--------------------------------------------------------------------------
            |
            | Redis is an open source, fast, and advanced key-value store that also
            | provides a richer set of commands than a typical key-value systems
            | such as APC or Memcached. Laravel makes it easy to dig right in.
            |
            */
    
            'redis' => [
    
                'cluster' => false,
    
                'default' => [
                    'host' => '127.0.0.1',
                    'password' => '',
                    'port' => 6379,
                    'database' => 0,
                ],
    
            ],
    
            /*
            |--------------------------------------------------------------------------
            | Use DB configuration for testing
            |--------------------------------------------------------------------------
            |
            | When running plugin tests OctoberCMS by default uses SQLite in memory.
            | You can override this behavior by setting `useConfigForTesting` to true.
            |
            | After that OctoberCMS will take DB parameters from the config.
            | If file `/config/testing/database.php` exists, config will be read from it,
            | but remember that when not specified it will use parameters specified in
            | `/config/database.php`.
            |
            */
    
            'useConfigForTesting' => true,
        ];

    config/homestead/mail.php

        <?php
    
        return [
    
            /*
            |--------------------------------------------------------------------------
            | Mail Driver
            |--------------------------------------------------------------------------
            |
            | Laravel supports both SMTP and PHP's "mail" function as drivers for the
            | sending of e-mail. You may specify which one you're using throughout
            | your application here. By default, Laravel is setup for SMTP mail.
            |
            | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
            |            "sparkpost", "log", "array"
            |
            */
    
            'driver' => 'smtp',
    
            /*
            |--------------------------------------------------------------------------
            | SMTP Host Address
            |--------------------------------------------------------------------------
            |
            | Here you may provide the host address of the SMTP server used by your
            | applications. A default option is provided that is compatible with
            | the Mailgun mail service which will provide reliable deliveries.
            |
            */
    
            'host' => 'localhost',
    
            /*
            |--------------------------------------------------------------------------
            | SMTP Host Port
            |--------------------------------------------------------------------------
            |
            | This is the SMTP port used by your application to deliver e-mails to
            | users of the application. Like the host we have set this value to
            | stay compatible with the Mailgun e-mail application by default.
            |
            */
    
            'port' => 1025,
    
            /*
            |--------------------------------------------------------------------------
            | Global "From" Address
            |--------------------------------------------------------------------------
            |
            | You may wish for all e-mails sent by your application to be sent from
            | the same address. Here, you may specify a name and address that is
            | used globally for all e-mails that are sent by your application.
            |
            */
    
            'from' => ['address' => 'noreply@domain.tld', 'name' => 'OctoberCMS'],
    
            /*
            |--------------------------------------------------------------------------
            | E-Mail Encryption Protocol
            |--------------------------------------------------------------------------
            |
            | Here you may specify the encryption protocol that should be used when
            | the application send e-mail messages. A sensible default using the
            | transport layer security protocol should provide great security.
            |
            */
    
            'encryption' => 'tls',
    
            /*
            |--------------------------------------------------------------------------
            | SMTP Server Username
            |--------------------------------------------------------------------------
            |
            | If your SMTP server requires a username for authentication, you should
            | set it here. This will get used to authenticate with your server on
            | connection. You may also set the "password" value below this one.
            |
            */
    
            'username' => '',
    
            /*
            |--------------------------------------------------------------------------
            | SMTP Server Password
            |--------------------------------------------------------------------------
            |
            | Here you may set the password required by your SMTP server to send out
            | messages from your application. This will be given to the server on
            | connection so that the application will be able to send messages.
            |
            */
    
            'password' => '',
    
            /*
            |--------------------------------------------------------------------------
            | Sendmail System Path
            |--------------------------------------------------------------------------
            |
            | When using the "sendmail" driver to send e-mails, we will need to know
            | the path to where Sendmail lives on this server. A default path has
            | been provided here, which will work well on most of your systems.
            |
            */
    
            'sendmail' => '/usr/sbin/sendmail -bs',
    
        ];
  4. Add .env to the root

    APP_URL=#URL#
    APP_KEY=#KEY#
    APP_ENV=homestead

    Put your values to APP_URL and APP_KEY

  5. Now connect with Vagrant via SSH and up the OctoberCMS:

    cd code
    php artisan october:up

If you use Windows, run "vagrant up" as administrator. Otherwise you'll have errors in the creating Symlinks

In production you can change APP_ENV to prod or just to set up your configuration.

Last updated

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.