The patience when you are learning new technologies.
Published: 2023-03-03 19:01:29

<p align="justify">In this days when I started my blog it arrived me the bad news that the Ghost's funcionalities will be free for limited time. They gave me a grace time but, afther that my blog and all its content will be wiped.</p>

<p> To resolve this I set out myself to use the Open Source version and this is the short explained way I could acheive it.</p>


<h2>AWS's EC2 Instance</h2>
<p align="justify">
    I took several classes inline about how to use AWS in the Platzi Platform in this<a target="__blank" href="https://platzi.com/cursos/aws-cloud-practico/"> link</a> you colud take the course, with the knowledgments adquired I could create an AWS's EC2 instance.</p>

<h2> Install Docker and set the Ghost Image</h2>
<p align="justify">Later I had to connect to the instance through SSH and follow this steps:</p>

<ul>
    	<li>
            Install the Docker Engine and its CLI as well, for this 			 I followed the instructions details in this <a 		href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-docker.html" target="__blank">link</a>.
    	</li>
        <li>
            Use the crypto keys generated by the EC2 AWS instace 				building process.
        </li>
    	<li>
            I Logged in as root user within due instance with the command
 			  <code>sudo su</code>.
    	</li>
    	<li>
            I Created by convenience y this way having control of my files a folder named <strong>blog</strong>
         </li>
    	<li>I Entered to that folder with the command <code>cd blog</code>.
    	</li>
    	<li>
            I Created a docker-compose.yml file with the command   			  <code>vim docker-compose.yml</code>.
    	</li>
    	<li>This openned the vim editor, later I pasted the code describe in the docker-compose secction from this <a href="https://hub.docker.com/_/ghost/" target="__blank">link</a>, the file will looks like this.
    	</li>
</ul>

<img src="https://phillipcabrera.com/content/images/size/w1000/2023/03/Screen-Shot-2023-03-03-at-11.19.22-AM.png"/>


<li>
    Located in the folder previously created (blog) I executed the command <code>docker-compose up -d</code>, this downloaded the Ghost Image and started the container in detached mode.
</li>

<p align="justify">By the moment I had  my container running, I could verify itself was being executing correctyly with the command <code>docker ps</code>, but later it surged the question. If If ha the EC2 AWS instance created, I have installed docker and the Ghost container is running, how can I access from my navigator to such container?
</p>

<p align="justify" >For this I went to my EC2 instace's configurations and I openned the port that was using my EC2 AWS's instance with the the Ghost container (port 8080). In the next <a href="https://linuxhint.com/open-port-aws-ec2/" targt="__blank">link</a> you will find what you need to know to open yours instance ports</p>

<p align="justify">After this with the public IP of my EC2 instance and the port dued openned (in this case 8080), I could access to the Ghost service. For example If my Instance's public IP is 44.201.51.20 I just had to type in the browser <strong>http://44.201.51.20:8080</strong>, we use the http protocol instead the https as we have not configurated the SSL certificated generation, later I will be indicating how to achieve this with <a href="https://traefik.io/traefik/">Traefik</a>, If you have any doubt about the difference between Http and Https check this <a href="https://phillipcabrera.com/diferencia-entre-hashing-y-salting/" target="__blank">post</a>.</p>

<p align="justify">Already with this steps explained superficially, I was able to have a Ghost's instance practily without limits and with much better price than the Ghost Org offers. For give you an example the last month (february) my instance cost was $US2.10.</p>

<p align="justify">Everything  sounds  nice, but itself took me three weeks to set it up investigating, proving in my local environment and over all ask for help without shame.</p>

<p align="justify">With this I want to tech you the next lesson: Be aware you do not know everything and the things will not set as you want at the first time but, do not give up keep forward, rest, about all ask for help and this way you will se at least in the IT field you will achieve your goals o failing that you will grow a lot.</p>