Your default job board
When you create a HireNorm account the external job portal associated with your company is hosted at the URL:
https://www.hirenorm.com/careers/<Your_Company_ID>
This is the site that applicants who are applying to open positions at your company will use in order to submit job applications.
Personalize your job board
Let's personalize this site so that users will be shown your company's career site URL instead of HireNorm's URL.
Web hosting provider
If you do not have a career site then begin by choosing a web hosting provider. In this example, Amazon Web Services (AWS) will be used since a generous free tier valid for 12 months is offered to all first time customers.
EC2 Ubuntu instance
Follow the getting started guide at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html
to launch an Ubuntu t2.micro EC2 instance. When you SSH into the instance using EC2 Connect you'll be in /home/ubuntu
.
Run the below commands to set up the environment and deploy your career site:
1) Update apt repository to get information about latest packages
sudo apt-get update
sudo apt-get upgrade
2) Install python's venv
package which will let us create virtual environments for python apps.
sudo apt-get install python3-venv
3) Create a virtual environment named venv
under career_site directory and activate it.
mkdir career_site
cd career_site
python3 -m venv venv
source venv/bin/activate
4) Install Flask package which will be used to create the site.
pip install Flask
5) Place your banner image in the folder static/images/
. Use wget or curl to fetch the banner image if it's available on another site.
wget -P static/images http://<location_of_your_banner_image>
6) We are now ready to create the Flask app. Create a file named app.py
and paste the below contents into it.
from flask import Flask
app = Flask(__name__)
html = """
<!DOCTYPE html>
<html>
<head></head>
<body style="margin: 0">
<div id="bannerimage" style="width: 100%; height: 100px; background-position: center; background-image: url('static/images/banner.png')"></div>
<iframe is="x-frame-bypass" src="https://www.hirenorm.com/careers/<Your_Company_ID>" style="display: block; border: none; height: 100vh; width: 100%" ></iframe>
</body>
</html>
"""
@app.route("/")
def site():
return html
if __name__ == "__main__":
app.run()
Replace url('static/images/banner.png')
above with your company's banner image located under static/images/
and src=""
tag with your company's
HireNorm external job portal URL. Adjust height and width attributes to stretch or shrink the banner image and the job board.
7) Flask apps when run will listen on port :5000
. Since http:// connection requests use port :80
we'll set up port forwarding from :80
to :5000
by placing
an nginx reverse proxy in front of the app.
sudo apt-get install nginx
8) Locate the public IP address of your EC2 instance and create an nginx config file at /etc/nginx/sites-enabled/<IP>
with following contents while substituting
<IP>
with the public IP address.
server {
listen 80;
listen [::]:80;
server_name <IP>;
location / {
proxy_pass http://127.0.0.1:5000;
include proxy_params;
}
}
The above nginx setting will proxy pass all incoming http requests on port :80
to port :5000
of localhost (=127.0.0.1
) where the Flask app is listening.
9) Start the nginx server as a systemctl service.
sudo systemctl enable nginx
sudo systemctl start nginx
10) Create a systemctl service file /home/ubuntu/career_site/career-site.service
for the Flask app with following contents.
[Unit]
Description = Flask career site app
[Service]
ExecStart = /home/ubuntu/career_site/venv/bin/python3 /home/ubuntu/career_site/app.py
[Install]
WantedBy = multi-user.target
11) Enable and start the service.
sudo systemctl enable /home/ubuntu/career_site/career-site.service
sudo systemctl start career-site
12) Access your site by going to the URL http://<IP>
in your web browser where IP
is the EC2 instance's public IP address.
Advanced
To make your career site look even more professional complete the additional steps listed below. These have been left as an exercise for you.
13) Provision a static IP address in AWS for your EC2 instance.
14) Buy a custom domain and update the records at your domain registrar to point to your EC2 instance's static IP address.
15) Configure SSL certificates to allow https:// connection requests.