Manvi Sharma (@manvigautam09)

manvigautam09's cover image
Powered by FIFO
manvigautam09's image

Manvi Sharma

Software Engineer @GlueLabs I am one of the FIFO developers🤗

Followers33
Following39
Spaces6

Docker: Managing data with Volumes (Part 2)

Hello everyone,

In the last post, we discussed the concept of volumes. We discussed the use of named and anonymous volumes.

In this post, we will discuss the need and use of bind mounts

We will learn the use of .dockerignore files. We will also see working with environment variables and .env files. We will also learn the use of build arguments.

Docker: Managing data with Volumes (Part 1)

Hello everyone,

In the last post, we learned to perform various operations with containers and images.

In this post, we will explore volumes, which are like state management for running applications with docker. We will discuss different kinds of data we encounter while working with docker.

We will learn about different kinds of volumes, and explore anonymous and named volumes in detail by discussing their implementation in a node server application. We will create these volumes in our system.

Docker: Basic Operations with Containers and Images

Hello everyone,

In the last post, we learned how to create and restart containers in Docker using a Python app example. We also learned about different modes in which containers can run.

In this post, we will cover the commands used for deleting containers and images, the validation process required for deleting them, and the importance of tagging images. Additionally, we will discuss renaming containers and the advantages of tagging images. We will learn to inspect images and copy files to and from containers. We will explore sharing images with other users/developers, and some other basic related actions.

Creating and Restarting Containers in Different Modes

Hello everyone,

In the previous post, we executed a small node app in a Docker container and learned about creating images and containers using Docker commands. We successfully ran and stopped a container.

In today’s post, we will delve deeper into images and containers. We will learn how to tag images, override the default names of containers, share/pull images on/from Dockerhub, and many more actions that are possible with them.

To view a comprehensive list of Docker commands, you can use the docker --help command. This will display all the available options along with a brief description of each command.

Docker Images and Containers:- The core building blocks

Hello everyone,

In the last post, we discussed the basic overview of Docker. In this post, we will dive deeper, install and setup Docker in our system, and use it in a small demo application to understand the core building blocks of Docker:- Images and Containers.

Docker Overview

Docker is an open-source platform designed to develop, deploy, and operate applications. It empowers us to decouple our applications from our underlying infrastructure, facilitating the swift delivery of software. Docker allows us to treat our infrastructure with the same agility and flexibility as our applications. Leveraging Docker's practices for packaging, testing, and deploying code, we can notably minimize the time gap between coding and production deployment.

Centrifugo(Highlights and Integration)

Hello everyone,

In the last post, we discussed the basics of Centrifugo and created the simplest real-time app. In this post, we will discuss the main highlights of Centrifugo.

In addition to its fundamental publish-subscribe (PUB/SUB) capabilities, Centrifugo offers a range of advanced features and building blocks to construct highly scalable real-time applications. Let's discuss main highlights and features which we will use going further.

Seamless Integration

Centrifugo was initially crafted to seamlessly integrate with frameworks lacking native concurrency support, such as Django, Laravel, and others.

Centrifugo

Centrifugo stands as an open-source and highly scalable real-time messaging server. It excels at swiftly transmitting messages to users of an application who are connected through various supported communication channels, including WebSocket, HTTP-streaming, SSE/EventSource, WebTransport, GRPC, and SockJS. One of Centrifugo's defining features is its utilization of channels, making it an essential user-centric PUB/SUB (publish-subscribe) server.

Centrifugo is a versatile solution that transcends programming languages, making it suitable for creating an array of applications, including chat apps, live commenting systems, multiplayer games, real-time data visualizations, collaborative tools, and more.

Hello everyone,

In the last post, we discussed Django Syntax and working with QuerySets in Django. Today we will discuss about working with static files in Django.

Create Static Folder

When building web applications, we need to add some static files like images or css files. We will start by creating a folder named static in our project, the same place where we created the templates folder:

The name of the folder has to be static.

my_tennis_club manage.py my_tennis_club/ members/ templates/ static/

Add a CSS file in the static folder, with any name in the folder, myfirst.css in our case:

my_tennis_club manage.py my_tennis_club/ members/ templates/ static/ myfirst.css

Open the CSS file and insert the following:

my_tennis_club/members/static/myfirst.css:body { background-color: lightblue; font-family: verdana;}

Modify the Template

Now we have a CSS file, with some CSS styling. The next step will be to include this file in a HTML template:

Django Syntax

Hello everyone,

In the last post, we discussed Django Admin. Today we will discuss Django Syntax, some Django basics like variables, tags, conditional statements, loops, comments, QuerySets etc.

Template Variables

In Django templates, we can render variables by putting them inside {{ }} brackets:

templates/template.html:<h1>Hello {{ firstname }}, how are you?</h1>

Create Variable in View

The variable firstname above was sent to the template via a view, as shown below:

views.py:from django.http import HttpResponsefrom django.template import loaderdef testing(request): template = loader.get_template('template.html') context = { 'firstname': 'Linus', } return HttpResponse(template.render(context, request))

As shown above, we create an object named context, fill it with data and send it as the first parameter in the template.render() function.

Create Variables in Template

We can also create variables directly in the template, by using the {% with %} template tag.