docker build -t hypercall:v1 -f docker/production.dockerfile .
- -t :::> indicate tag name (ex. hypercall:v1)
- -f :::> provide path from which you wanna build the docker image
docker image ls -a
docker run -d hypercall:v1 ::>> It is not exposing the port that we have mentioned in the dockerfile for build
docker run -d -p 3000:3000 hypercall:v1
port_of_server:port_which_exposed_from_docker
- -d :::> indicated the detach mode
- hypercall:v1 :::> image tag we have provided while building the docker image
docker ps
docker logs b872d3c9c181 --tail 100 -f
- b872d3c9c181 ::> container id
- docker stop container_id
- docker rm container_id
BASE_URL : EC2_PUBLIC_IP:EXPOSED_PORT
BASE_API_URL : NODE_SERVER_API_URL
Ex. /api/getAll
API_URL : BASE_URL + BASE_API_URL
Ex. http://35.154.119.51:3000/api/getAll
Replace PUBLIC_IP of EC2 INSTANCE in Homepage URL and Authorization Callback URL
-
Setup DRONE.IO CI in EC2 Instance
VISIT Drone.IO Documentation to setup drone ci in EC2 instance
docker run --volume=/var/lib/drone:/data --env=DRONE_GITHUB_CLIENT_ID=GITHUB_CLIENT_ID --env=DRONE_GITHUB_CLIENT_SECRET=GITHUB_CLIENT_SECRET --env=DRONE_RPC_SECRET=GENERATED_RPC_SECRET --env=DRONE_SERVER_HOST=EC2_INSTANCE_PUBLIC_IP --env=DRONE_SERVER_PROTO=http --publish=80:80 --publish=443:443 --restart=always --detach=true --name=drone drone/drone:2
Download it from https://www.jenkins.io/download/lts/macos/ here.
then follow this blog to setup Jenkins in mac.
https://www.macminivault.com/installing-jenkins-on-macos/
Jenkins always run in 8080 port : http://localhost:8080/