Git Product home page Git Product logo

fuspay's Introduction

Nginx Deployment with docker and docker compose

This is a sample Django project that has been containerized using Docker. This guide covers serving static files, handling media files , and enhancing security through SSL with Certbot.

Prerequisites

Before you get started, make sure you have the following tools installed on your system:

Getting Started

Follow these steps to set up and run your Django project using Docker:

  1. Clone this repository to your local machine:

    git clone https://github.com/budescode/fuspay.git
    cd project
    
  2. Create an .env file in the project and paste your env variables needed for the project

    POSTGRES_DB=mydb
    POSTGRES_USER=myuser
    POSTGRES_PASSWORD=mypassword
    DJANGO_SETTINGS_MODULE=project.settings_staging
    
  3. Replace mydomain.com with your actual domain names in both the docker-compose.yml and nginx/nginx.conf file. Make sure your domain name has been properly configured with your server, else it won't work.

  4. Build and start the Docker containers in detatch mode to run on background:

    docker-compose build
    docker-compose up -d
    
  5. To stop the containers, run:

    docker-compose down
    

Project Structure

The project structure follows a typical Django layout, with a few additional files and directories for Docker containerization:

Dockerfile: Specifies the instructions for building the Django application container. docker-compose.yml: Defines the services (containers) required for the application, including the web server and database. requirements.txt: Lists the Python packages and dependencies required for the Django application. .env: Configuration file for environment variables. static/: Static files for your project (CSS, JavaScript, etc.). media_cdn/: Media files (user uploads, images, etc.). templates/: HTML templates for rendering views.

Customization

You can customize this project by:

Modifying the Django application. Adjusting the Docker configuration in the Dockerfile and docker-compose.yml to suit your needs. Adding additional Django apps, models, and views as per your project requirements.

Contributions

If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License This project is licensed under the MIT License. Feel free to use and modify it for your needs.

Happy coding!

fuspay's People

Contributors

budescode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.