Continuous Integrations and Deployment, Docker and Software Architecture at YUK-RECYCLE

Donny Samuel
PPL A-4 YUK RECYCLE
3 min readApr 16, 2019

Hi, it’s Donny !

With this blog I want to share about our app, YUK-RECYCLE’s deployment and software architecture.

Our apps actually scale bigger than we thought so to support it, we decide to go with a great architecture.

Above is our architecture. We built 2 mobile apps, 1 backend, third party such as firebase and google API. For the database we use PostgreSQL.

The way we communicate (Mobile and backend) through REST API. On backend side, deploy using Docker and we code using GoLang and Database PSQL. Both deploy in the same Docker so they can communicate easier.

For mobile (front end) we use GitLab as our repo and maintain all of our code in GitLab.

Continuous Integrations

Our CI/CD (Continuous Integrations/Continuous Deployment) we put in gitlab.ci.yml file. How it works? When we push or commit, it will trigger this file so it will automatically activate. Some different between backend and frontend is if the changes in frontend, it will trigger frontend test, if backend, it will trigger backend test. After that, it will trigger lint. If it merge to staging branch, if it is Mitra or Customer App, it will build APK.

Docker

Docker is a virtualization software that act like container — because it can’t reach the machines environment — that is pretty much secure (it has very few vulnerability and can only have one if configured to do so) and running generally on linux.

Docker has mini OS called image. At image we can include every dependencies we use. For example we code using GoLang and Flutter, we install it to our image. Also we install our PostgreSQL there.

Portainer is used when we want to duplicate image or etc. It is acted as a GUI.

After backend merge to staging, it will deploy to docker but still manually click at portainer. After deploy an up at our docker, frontend can use it as an end point of our apps. It’s so easy to use and thanks to or DevOps, Azka Ali.

Benefits using Docker

Easier to scale your apps. You just have to add another container and poof, done.

Secondly, more secure. If someone try to hack you, from your applications, the go straight to docker, not you computer who running it

What to improve

Load balancer. We can actually relieve amount of work by separate the work to many machines. In this case, we can use Kubernetes and etc.

Thank you for reading this! Hope to see you soon. Cheers *D*

--

--

Donny Samuel
PPL A-4 YUK RECYCLE

CS Student at University of Indonesia | UI/UX, Tech Enthusiast