Code Monkey home page Code Monkey logo

girls_django's Introduction

Docker打包方法

  • 登录docker hub:docker login
  • 打包:docker build -t billjyc/girls_django:latest . --platform linux/amd64
  • 上传:docker push billjyc/girls_django:latest

启动

  • nohup gunicorn django_exercise.wsgi:application -c gunicorn_config.py &
  • docker启动方法:docker run -d -p 8099:8099 -v /data/logs/girls_django/:/usr/app/logs billjyc/girls_django:latest `

本地数据库迁移

  • python manage.py migrate
  • 如果数据库切换,在DBeaver上操作会提示无权限,需要进命令行操作
    • mysql> create database abc; # 创建数据库
    • mysql> use abc; # 使用已创建的数据库
    • mysql> set names utf8; # 设置编码
    • mysql> source /home/abc/abc.sql # 导入备份数据库

静态文件修改

  • 静态资源目录在settings.py中的STATIC_ROOT变量配置
  • 如果静态资源文件发生变化,需要执行python3 manage.py collectstatic来刷新

girls_django's People

Contributors

billjyc avatar

Stargazers

 avatar Yang avatar

Watchers

James Cloos avatar  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.