Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Profiles #12

Open
HMRDevil opened this issue May 14, 2024 · 2 comments
Open

Add Profiles #12

HMRDevil opened this issue May 14, 2024 · 2 comments

Comments

@HMRDevil
Copy link

HMRDevil commented May 14, 2024

The suggestion is to add "profiles".
Example of a command:

project init --dir --domain --profile

The command creates a project folder, a subfolder is created .osp and the project.ini file inside

--dir - project directory, required parameter. If the projects_search_path variable does not contain the path to the project folder, the path is added.
Example:
--dir = path_to_project_directory\my_project
There is no path_to_project_directory in the projects_search_path variable - it is automatically written to the variable

--domain - The domain name for project.ini. An optional parameter. If not specified, it is created automatically by the folder name and .local
Example: my_project.local

--profile - Pre-defined profiles for projects with specific modules
Example:
default_profile.ini
nginx_engine=NGINX157
node_engine=20.20.1
php_engine=8.1
ssl=on

ets

UPDATE
I will describe it in more detail. Profiles are separate prepared program entities.

Profile example:
example_name_wordpress.ini
php_engine = PHP-8.1
node_engine = 20.20.1
ssl = on

When using the output command, we get the project directory at the path we specified with an already nested folder .osp and the generated project.ini file.

Example command:
project init C:\domains\my_project my_domain.local example_name_wordpress
We will get:
The my_project domain folder with a subfolder .osp and generated project.ini:

[my_domain.local]

php_engine = PHP-8.1
node_engine = 20.20.1
ssl = on

Ideally, after the specified modules for the domain are activated automatically.

It's really on the verge of what you want, so that you can specify subsequent commands in profiles, for example:

example_name_wordpress.ini
php_engine = PHP-8.1
node_engine = 20.20.1
ssl = on
[commands]
RU unzip wordpress.zip

and after creating the domain, activating the modules, the archive was unpacked to the project folder

Mini deployment

@delphinpro
Copy link

delphinpro commented May 23, 2024

The default settings for the project are already defined in program.ini.
It is unclear why it is proposed to use default_profile.ini?

@HMRDevil
Copy link
Author

@delphinpro Updated it. I painted it in more detail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants