Skip to main content

Posts

Showing posts from April, 2021

how to setup rails with docker on ubuntu ?

I am assuming that you already know about rails and also have setup docker on your system Create sample app and change directory rails new sample-app cd sample-app Create Dockerfile FROM ruby : 2.5 RUN apt-get update -qq && apt-get install -y nodejs postgresql-client WORKDIR /sampe-app COPY Gemfile /sampe-app/Gemfile COPY Gemfile.lock /sample-app/Gemfile.lock RUN bundle install COPY . /sampe-app COPY entrypoint.sh /usr/bin/ RUN chmod +x /usr/bin/entrypoint.sh ENTRYPOINT [ "entrypoint.sh" ] EXPOSE 3000 CMD [ "rails" , "server" , "-b" , "0.0.0.0" ] Create entrypoint.sh #!/bin/bash set -e # remove potentiallly pre existing server.pid for rails rm -f /sample-app/tmp/pids/server.pid # execute the docker containers main process exec " $@ " Create docker-compose.yml version : "3.9" services : db : image : postgres volumes : - ./tmp/db:/var/lib/postgresql/data envir...

How to add custom ads.txt in blogger site

How to add custom ads.txt in blogger sites? Its super easy, you just need to copy ads.txt content downloaded from adsense Select your blog from dropdown Go to settings Go to monetizatons section Enable checkbox Click on custom ads.txt Add copied content from downloaded ads.txt file and past in this box and press save