Deployment
Unzip the archive into your server directory.
I. Folder architecture
1.app
Folder containing the sources specific to your project.
2. public
Folder contains your application’s public resources (CSS, JS, Images, etc.) This is the only folder accessible from the outside.
3. supplier
Folder containing the libraries used by your application.
4.storage
Folder containing the data used by your application (configuration, cache, translations, log, etc.).
5. Index.php
Application entry point
II. Basic configuration
1. Main configuration
Open the “storage/config/main.json” . This file contains the basic configurations of your application.
[pastacode lang=”css” manual=”%7B%0A%20%20%20%20%22dao_source%22%3A%20%22pdo%22%2C%0A%20%20%20%20%22cookie_iv%22%3A%20%222f57912d7bd53cc6f8e8af813c8d738a%22%2C%0A%20%20%20%20%22cookie_key%22%3A%20%22ra51pnvb%22%2C%0A%20%20%20%20%22default_lang%22%3A%20%22en%22%2C%0A%20%20%20%20%22dev_mode%22%3A%20true%2C%0A%20%20%20%20%22app_installed%22%3A%20false%2C%0A%20%20%20%20%22ssl_enabled%22%3A%20false%0A%7D” message=”main.json” highlight=”” provider=”manual”/]
a. dao_source
Represents the name of the primary data access medium.
b. cookie_iv
Represents one of the keys used to encrypt cookies.
c. cookie_key
Represents one of the keys used to encrypt cookies. It is also used to encrypt passwords.
d. default_lang
Represents the default language.
e. dev_mode
Indicates whether you are in developer mode or not.
F. app_installed
Indicates that the application is installed.
2. Database configuration
Open the “storage/config/db.json” file. This file contains the configuration information for your database.
[pastacode lang=”css” manual=”%7B%0A%09%22host%22%3A%20%22localhost%22%2C%0A%09%22user%22%3A%20%22root%22%2C%0A%09%22password%22%3A%20%22%22%2C%0A%09%22database%22%3A%20%22corefw%22%2C%0A%09%22table_prefix%22%3A%20%22msk_%22%0A%7D” message=”db.json” highlight=”” provider=”manual”/]
a. host
Represents the address of the database server
b. user
Represents the username.
c. password
Represents the password.
d. database
Represents the name of the database.
e. table_prefix
Represents the prefix of tables.
f. driver
Represents the name of the database driver. The default is “mysql”. Possible values are oracle, pgsql, etc …
g. dsn
Represents the complete database access dsn. This field is optional. Because the previous information will be used to create the dsn. This field can be useful in case you want to use a driver that does not use the previous information (eg sqllite, odbc).
3. Configuration of sub-applications
Open the “storage/config/sub_apps.json” file. This file contains the configuration information of the available sub-applications (Front office, Back office, API, etc.).
[pastacode lang=”css” manual=”%7B%0A%09%22FRONT%22%3A%20%7B%0A%09%09%22url_path%22%3A%20%22%22%2C%0A%09%09%22lang_in_url%22%3A%20true%0A%09%7D%0A%7D” message=”sub_app.json” highlight=”” provider=”manual”/]
In this file, the key represents the name of the sub-application (FRONT, ADMIN, API, etc…).
a. url_path
Represents the relative path (eg admin, api) to access the sub application. The full path will be in the form {baseUrl}/{url_path} where baseUrl represents the base url eg http:localhost/muuska or https: www.domain.com.
Example full path: http: localhost/muuska/admin (where url_path = admin), http: localhost/muuska/api (where url_path = api), http: localhost/muuska (where url_path is empty), https: www.domain .com/admin.
b. lang_in_url
Indicates whether the language should be added in the final URL or not. If the value of this field is true, the full path will be in the form {baseUrl}/{url_path}/{lang} where lang represents the language code.
Example full path: http: localhost/muuska/admin/en (where lang = en), http: localhost/muuska/admin/fr (where lang = fr), http: localhost/muuska/admin (where lang is empty) , https: www.domain.com/fr (where url_path is empty and lang = fr).
c. host
Allows you to define a specific address for the sub-application. You can for example use a subdomain as host of your sub application (admin.domain.com, api.domain.com).
d. authentication_required
Indicates whether authentication is required to access the sub-application or not.
e. access_checking_required
Indicates whether access rights checking is enabled.
f. cookie_lifetime
Represents the number of hours the visitor’s cookies will be kept.