MAD-I-T / magento-actions

Github deployment actions for Magento 2
MIT License
99 stars 35 forks source link

It is possibile to set a network configuration? #7

Closed EspertoMagento closed 3 years ago

EspertoMagento commented 3 years ago

It is possibile to set a network configuration with a static IP address? what is the right syntax?

Thanks

seyuf commented 3 years ago

Hi, If i understand correctly, you're talking about the zero-downtime feature? If so, you'll just have to set the ip address in place of the domain name as the HostName in the STAGE_SSH_CONFIG variable see below and/or tuto here.


  STAGE_SSH_CONFIG = 
                    Host staging                # this must be staging or production according to your deployment type
                    User ubuntu                 # the staging/prod username bound to the ssh connecting 
                    IdentityFile ~/.ssh/id_rsa  # Do not modified this unless you know what you're doing
                    HostName my-awesome-shop.fr # the hostname or ip addr of your deployment server prod or staging
                    Port 22                     # The ssh often 22 to be modified accordingly to the server setup
EspertoMagento commented 3 years ago

Hello, thanks for the answer. No, I meant if I could set a static ip inside the docker container of the jobs in the main.yml file that run the zero-downtime actions. Do you understand?

seyuf commented 3 years ago

Hi, Yes, although this is more related to github actions than this project ... In any case, without knowing the specifics of what you're trying achieve, your best bet would be to setup a self-hosted runner. By default Github-hosted runners do not allow messing with containers/services internal network. If you can't spare a machine to host a runner your self and/or cost management, you may try alternative solution like vpn and others (gitlab-ci) depending on your project requirements.

EspertoMagento commented 3 years ago

I figured I had to use self-hosted runner but I was hoping not! Thank you for your support.