Once you got your account on CircleCI and setup your project linked to your git repository, you will have to have a directory named “.circleci” inside the root of your project repo. Create a file named “config.yml” in there. Grab the sample script given by CircleCI platform according to your project type. The first …
Read MoreLet’s say one of your micro services is running on http://localhost:3000 If you already have a nginx service running on the server, create a server block like this: 1vim /etc/nginx/sites-available/domain.com.conf Grab this content to paste in: 1server { 2 3 server_name domain.com; 4 5 root /var/www/html; 6 index …
Read MoreLet’s say there are two pull requests open on a project repository. Each change has its own branch like this: master feature/add-base64-endpoint feature/add-user-agent-endpoint The challenge is to use git rebase to add both changes to master. When you finished, your master branch should have three commits in the …
Read MoreLet’s update the Password Authentication parameter in the ssh service config file: 1vim /etc/ssh/sshd_config Hey, what? You can't even find the sshd service? Install it then: 1sudo apt update 2sudo apt install openssh-server In the /etc/ssh/sshd_config file, uncomment this line: 1#PasswordAuthentication yes Boom! Done. …
Read MoreBack up the current sources.list first. 1sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup Well, run this command then. 1sudo echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list Now you can run apt update command! Happy networking! 😎
Read MoreFirst things first. Let’s check the directory structure of the app. A Full Stack MEVN Application Let’s take a look into the DB image first. 1FROM mongo:latest 2 3WORKDIR /app 4COPY . /app 5 6ENV MONGO_INITDB_ROOT_USERNAME=root 7ENV MONGO_INITDB_ROOT_PASSWORD=password 8 9EXPOSE 27017 I thought importing dump data …
Read MoreI think this is really important in practical docker battle field. 🙂 Let’s go for the docker-compose.yml first. 1version: '3' 2 3services: 4 nginx: 5 image: nginx:1.15-alpine 6 restart: unless-stopped 7 volumes: 8 - ./data/nginx:/etc/nginx/conf.d 9 - ./data/certbot/conf:/etc/letsencrypt 10 - …
Read MoreLet’s go for our docker-compose.yml first. 1version: '3' 2 3services: 4 wp: 5 image: wordpress:latest 6 ports: 7 - ${IP}:80:80 8 volumes: 9 - ./php.conf.ini:/usr/local/etc/php/conf.d/conf.ini 10 - ./wordpress:/var/www/html 11 environment: 12 WORDPRESS_DB_HOST: db 13 WORDPRESS_DB_NAME: "${DB_NAME}" 14 …
Read MoreLaunch OpenVPN client as a daemon. Here I assume you already have your own cert file - filename.ovpn. 🙂 Modify its file extension to conf like so: 1mv filename.ovpn filename.conf Put your cert file inside /etc/openvpn directory like so: 1mv /path/to/filename.conf /etc/openvpn/ OpenVPN client service name would be …
Read MoreTo run a container from an image: 1docker container run -it --rm ubuntu /bin/bash -t: terminal inside -i: (STDIN) grabbing --rm: remove container automatically when process exits --name: name the container or daemon -d: daemonize the container running To list all containers: 1docker container ps -a To start or stop …
Read More