Vauxoo / travis2docker

This is a Library to transform travis to docker file
BSD 2-Clause "Simplified" License
13 stars 15 forks source link

[FIX] start ssh server when `START_SSH` build-env-arg is supplied (deployv) #201

Closed antonag32 closed 1 year ago

antonag32 commented 1 year ago

Fixes #200.

When supplying t2d the "START_SSH" argument during setup it is expected that the generated image will automatically start running the ssh service.

This was not happening when using --deployv, it has been fixed by adding the logic to autostart the server in the entrypoint for it.

Since the SSH server can only be started by root, the other commands in the entrypoint have been modified to use the correct user if the image is being run as root.

The same support has been given to ODOO and PSQL services. They start by default but this can be avoided by providing a falsy value for START_ODOO and START_PSQL respectively.

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (5b4fe32) 82.32% compared to head (7111643) 82.32%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #201 +/- ## ======================================= Coverage 82.32% 82.32% ======================================= Files 7 7 Lines 594 594 Branches 102 102 ======================================= Hits 489 489 Misses 75 75 Partials 30 30 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

antonag32 commented 1 year ago

@luisg123v @moylop260

Can you review please?

luisg123v commented 1 year ago

Description:

When you say "build arg", I think you mean env var

antonag32 commented 1 year ago

Description:

When you say "build arg", I think you mean env var

I guess the technically correct way would be build-env-arg since I am referring to the command line arguments used to set START_SSH.

antonag32 commented 1 year ago

I made the corrections @luisg123v.

Should the support for not starting postgresql and odoo be made on a different PR? Also I personally think having the option to not start odoo would be more helpful than the option of not starting postgresql.

Sometimes I want to run Odoo with different arguments specially when developing tests, and having it run as a service gets in the way. However postgres has never gotten in the way, so I wonder if it would be really useful to have the option to not start it.

moylop260 commented 1 year ago

@luisg123v

Could you check it, please?

antonag32 commented 1 year ago

I think the other two options (START_ODOO and START_POSTGRESQL) are still missing but I don't know if we should add it here or in a new MR.

luisg123v commented 1 year ago

@antonag32,

I think the other two options (START_ODOO and START_POSTGRESQL) are still missing but I don't know if we should add it here or in a new MR.

I think it could be here. All options are new and behave similarly

antonag32 commented 1 year ago

@luisg123v sorry for the delay, I implemented the two other arguments , START_ODOO and START_PSQL.

Can you review?

cc @moylop260