Hi all,
i am very new to all of this CD/CI and i need your help.
I have a Nodejs app that i would like to automatize with CircleCI.
I would like to:
Test the nodejs application.
Create a Docker container
Upload the container to Dockerhub
Log into AWS EC2 β here i need the most help
Pull the container
Stop the old one
Run the new one
how can i achieve this without the ECR and other amazon services, nor using teraformer.
I would like a clean login ( or ssh ) to EC2 and run a shel or some commands
Mostly, you donβt log in to CI servers - they tend to start on a Git push or a schedule.
Yes, you can do everything you want here - do one step at a time, it will seem less overwhelming. Get a bare-bones .circleci/config.yml running first, then add to it, small blobs of config at a time.
There are a variety of techniques in my config here, but this uses a standard Docker registry. AWS unfortunately does things in a non-standard way with their own binary, so you may want to do things the easy way first, then convert when it is working.
I would recommend Dockerising your app first, and running it locally. That is worth practising with for a bit - if you are new to Docker I would recommend doing some learning with it rather than moving to production immediately.
For production I would suggest standard Docker to start with, and if you are keen to have zero downtime during upgrades, look at Docker Swarm. Both are much simpler than alternatives like Kubernetes.
Good luck giving it a go, and of course do ask questions if you get stuck on something specific.
Hi Ion. Thanks for sharing what worked. Our docs are open source, so if you think this would be good on a page you can either open a pull request or an issue (there are links to both at the bottom of every page) and we can take a look.