Giter Site home page Giter Site logo

neprostoilya / restaurant_bot Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 34.76 MB

Restoran Bot for order

License: GNU General Public License v3.0

Python 2.39% HTML 1.06% JavaScript 74.28% CSS 8.64% Handlebars 0.71% Less 6.29% SCSS 6.63% Dockerfile 0.01%
aiogram django django-rest-framework docker-compose

restaurant_bot's Introduction

Restaurant Bot

Restaurant Bot is a comprehensive dining app designed to enhance your restaurant experience. It offers seamless food ordering, table reservations, and pick-up options, all within a user-friendly interface. With Restoran Bot, enjoy real-time menu browsing, quick reservations, and hassle-free orders, making your dining experience smoother than ever.

Link bot in telegram: https://t.me/Cafe_7a_bot

Setup And Start

  1. Download Docker and Docker Compose
    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    sudo apt-get install docker-ce
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo systemctl start docker
  1. Create main folder and clone reposetory
    mkdir /var/www/ 
    mkdir /var/www/restaurant_bot/
    cd /var/www/restaurant_bot/
    git clone https://github.com/neprostoilya/restaurant_bot.git
    cd restaurant_bot/
  1. Setup in .env file
    SECRET_KEY=django_secret_key
    
    DEBUG=1 or 0 
    
    TOKEN_BOT_1=token_for_restaurant_bot
    
    TOKEN_BOT_2=token_for_manager_bot
    
    NAME=db_postgres
    USER=postgres
    PASSWORD=password_postgres
    HOST=db
    PORT=5432
    
    CLICK=your_ssh_code_for_click
    
    POSTGRES_DB=db_postgres
    POSTGRES_USER=user_postgres
    POSTGRES_PASSWORD=
    
    PAYME=your_ssh_code_for_payme
  1. Setup In nginx/default.conf:
    server {
        listen 80;
        server_name your_domain;
    
        location / {
            proxy_pass http://api:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    
        location /static/ {
            alias /app/api/static/;
        }
    
        location ~ /.well-known/acme-challenge/ {
            root /var/www/certbot;
        }
    }
    
  1. Start docker compose
    docker compose up -d db api nginx
    docker compose up -d certbot
  1. Before 'Succesful Let's Encrypt', you have to change config In nginx/default.conf:
    server {
        listen 443 ssl;
        server_name your_domain;

        ssl_certificate     /etc/letsencrypt/live/your_domain/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/your_domain/privkey.pem;
        ssl_trusted_certificate /etc/letsencrypt/live/your_domain/chain.pem;

        location / {
            proxy_pass http://api:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }

        location /static/ {
            alias /app/api/static/;
        }

        location ~ /.well-known/acme-challenge/ {
            root /var/www/certbot;
        }
    }
  1. Before 'Succesful Let's Encrypt', you have to change config In nginx/default.conf:
    docker compose up -d nginx
    docker compose up -d bot

..end

restaurant_bot's People

Contributors

neprostoilya avatar

Stargazers

 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.