Giter Site home page Giter Site logo

nkuxx161 / answer_platform Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 254 KB

2020年暑期计蒜客实训项目——在线答疑平台(2021年3月27日从gitlab转移过来)

License: GNU General Public License v3.0

Makefile 0.69% Dockerfile 0.44% Python 40.04% Shell 0.01% JavaScript 10.55% HTML 0.27% Vue 47.99%

answer_platform's Introduction

Example Environment for Django, MariaDB, NginX, Gunicorn using Docker

Languages: English | 中文

Introduction

This is a Docker setup for a web application based on Django.

  • The Django application is served by Gunicorn (WSGI application).
  • We use NginX as reverse proxy and static files server. Static files are persistently stored in volumes.
  • MariaDB is used. Data are persistently stored in local files.
  • Python dependencies are managed through pipenv, with Pipfile and Pipfile.lock.

Also a Makefile is available for convenience. You might need to use sudo make instead of just make because docker and docker-compose commands often needs admin privilege.

Note: Make command may not run on Windows !

Requirement

You need to install Docker and Docker-Compose.

Quick Start

In the first time, you should execute these commands step by step.

Backend

    docker-compose build
    docker-compose run --rm django answerplatform/manage.py migrate
    docker-compose run --rm django answerplatform/manage.py collectstatic --no-input
    docker-compose down
    docker-compose up

The server will run on port 8000, so you can visit localhost/backend/admin/ to access to your Django server.

Stop the Django server with:

    docker-compose down

Frontend

In DEV (develop environment)

    cd frontend
    npm run serve

The frontend will serve on localhost:8080

answer_platform's People

Stargazers

 avatar Xiong Xiao avatar

Watchers

Xiong Xiao 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.