Viewing posts tagged Django

Kubernetes : Django, Redis, Frontend, Nginx (reverse proxy & ingress) setup on Bare Metal Server & CICD Guide

Follow Below Steps in sequence. FYI I have created EC2 on AWS.

  1. Create ubuntu 20 LTS instance. open 22, 80, 443 port.
  2. Enable net.bridge.bridge-nf-call-iptables
sudo su
cat > /etc/sysctl.d/20-bridge-nf.conf <<EOF
net.bridge.bridge-nf-call-iptables = 1
sysctl --system

     3. Install Docker...

Django Admin File field ( Widget ) for AWS Identity based S3 uploads

When you are working with AWS serverless, You probably has faced body size limit for your lambda function. Basically It won't allow file uploads beyond size limit specified. 
Here is guide if you are using Django in your website and deployed on AWS Lambda + API Gateway ( Zappa ) And want to allow file uploads of any size in Django Admin using AWS S3 Identity based uploads.

Write One API which give response as following json : 
     `/api/awsIdentity/` // any endpoint you like make sure authenticated and GET only

          "IdentityId": "",
          "Token": "",
          "bucket_name": "",
          "bucket_region": "",
          "auth_role_arn": ""

Your widget for File Field And Admin Form will looks like this : 

    from django import forms
    from django.contrib import admin

Django 1.8 + GIS (postgis) + PostgreSQL 9.4 + Digital Ocean + Gunicorn + Nginx + Ubuntu 14.04 & Virtualenv. Complete Deployment Guide step by step.

Step 0 : Create droplet with django application image.

Step 1 :

Connect to Digital Ocean server :