You have a simple website and an admin page. But you may not want to build an authentication system or back-end code to do it. Or, you just want to give the website access to few people only you know — in these cases you can simply use nginx authentication mechanism.
Nginx auth is a a module comes along with nginx installation, which restricts access to defined pages/areas of the site.
Below are the steps to install and configure auth modules.
sudo apt-get update
sudo apt-get install apache2-utils
Create a user and it’ll prompt you to enter and confirm password
So, I have a deployment shell script — obviously for the purpose of deploying the built jar in the server. The shell script will have steps to deploy the application like — stop current service, replace jar and start latest.
But you also may need to send a notification or need to understand if the app is up after you have deployed the latest. I’m using a spring-boot application and enabled actuator end point (/actuator/health).
So, you can call the api for some seconds or minutes until the app goes live. When the api returns success, that means the application is up. Below is the script that could be used.
This article will guide you through, how you could upload the generated artefacts from CircleCI to GitHub. I am using a spring-boot project here.
Chain: Git Tag -> GitHub -> CircleCI ->GitHub
When a release is being made using git tags, you might need to store the artefacts. So, the basic problem is — the artefact is built from CI server and not from GitHub, so you need to few additional steps in-order to achieve this.
Below is the snippet which does the job. jdk 8 docker executor.
- run: export TERM=xterm && ./gradlew bootJar
- run: ls build/libs/
- run: sudo…
I am sure that if you are here, you definitely heard about docker few times at-least. Docker and containerisation are the buzz words of any team these days. So, there are few similar words related do docker. This article will walk you through some terms and I will post some most basic operative commands which are being used.
Docker (Software): Docker is an open-source software designed to facilitate and simplify application development. It is a set of platform-as-a-service products that create isolated virtualisation environments for building, deploying, and testing applications.
Docker (Company): Docker Inc is the company which developed and…
Until this morning, I wasn’t experimented this feature. But I’m a big fan of it now. Today, when I was scrolling through a profile, I got a chance to see some article on it and so, I wanted to try it out.
GitHub Actions can be considered as bot. It works based on the script we write. It can Deploy an application, manage packages or perform any repository actions.
Mostly everyone follow the SDLC process to develop any software and that’s necessary. Basically, you can manage all the SDLC process with GitHub actions.
Each action is an individual tasks. A…
If you are here, you might have some basic understanding of docker. If not, Docker is a container technology, which helps to build, package and ship application and its dependencies easily.
Hope you already have the spring-boot project to try or install docker.
Create a file named Dockerfile in the root of your project and add below content to it.
COPY build/libs/*.jar /app/app.jar
Now run below command in root of your project:
./gradlew clean build
docker build -t myorgs/myapp .
Now, your docker image is generated. If you run command docker ps, you will able to…
Are you tired answering “did you deployed latest version” question by your peers/developers? This post is for you.
In fact, I was tired answering my peers that the latest code is deployed. Each time when a bug arises, Dev comes to me asking if I had deployed latest changes. So, I enabled actuator in my spring application, so that anyone can check the version using an end-point.
Below is how you can enable actuator end-point in spring-boot application.
Check this post to see how to enable versioning, so that that versions can be displayed in the actuator end point.
I was recently working on a spring-boot release management and continuous integration process. As a part of the project, had to do versioning of the releases with GitHub. It took a while to figure out the stuff. So, I thought of writing this.
To get started with, hope you have a sample spring project. If not, use this link to create or use the project.
Next step is to add versioning plugin to your gradle file. Add plugin as below (Refer this link to know more about the plugin):
id 'com.palantir.git-version' version '0.12.3' ...
SSH or Secure Command is a network protocol, that helps to connect and perform operation in the remote machine. You can connect to SSH with key or username and password.
By default SSH uses port 22. You may need to change the ssh port for security security reasons such as to avoid targets from bots. You can change the default port by below steps.
This is simple guide to building a jar and running the application in Linux based servers as system service.
Please check this post to see how to bootstrap/create a simple project.
On spring-boot, we deploy/run jar or war file. Once you have the project, you can run ./gradlew clean bootJar command in the project to produce the jar file. The jar file will be located in folder — build/libs/ directory.
Once you have the jar built, you can copy the jar to server using scp command. Check this post to see how to copy file to server using scp.
Start-up and tech enthusiast. I write about Tech, Devops and anything related.