当前位置:网站首页>Docker container Django + MySQL service
Docker container Django + MySQL service
2022-07-24 23:49:00 【Clean night mortal dust】
docker Containerization django + mysql service
Introduce
Use django Simple implementation in web The interface is incremented 、 Delete 、 Change 、 Check the operation of the , In order to facilitate deployment , The service is made into a mirror .
Dockerfile
FROM python:3-alpine
COPY . /opt/
WORKDIR /opt/
# The point is : Need to install gcc And other related compilation tools , To compile mysqlclient, Otherwise, an error will occur when installing the environment
RUN apk add --update --no-cache mariadb-connector-c-dev \
&& apk add --no-cache --virtual .build-deps \
mariadb-dev \
gcc \
musl-dev \
&& pip3 install -r requirements.txt \
&& apk del .build-deps
EXPOSE 8000
CMD python3 manage.py runserver 0.0.0.0:8000
Build run
docker build -t xxx/django-web .
# Upload to private warehouse
docker push xxx/django-web:latest
Now I can run my under any system django service .
Demo code :https://gitee.com/glnp/django-mysql-test/tree/master
边栏推荐
- Implementation of cat and dog data set classification experiment based on tensorflow and keras convolutional neural network
- Paper time review MB2: build a behavior model for autonomous databases
- The laneatt code is reproduced and tested with the video collected by yourself
- Qt项目-安防监控系统(各个界面功能实现)
- Notes of Teacher Li Hongyi's 2020 in-depth learning series lecture 1
- Piziheng embedded: the method of making source code into lib Library under MCU Xpress IDE and its difference with IAR and MDK
- Digital stopwatch based on Verilog HDL
- Architecture design of multi live shopping mall
- Which securities account is the best and safest for beginners
- 采坑记录:TypeError: 'module' object is not callable
猜你喜欢

Notes of Teacher Li Hongyi's 2020 in-depth learning series 7

How to put long links into Excel

Notes of Teacher Li Hongyi's 2020 in-depth learning series 5

每周小结(*66):下一个五年

Development direction and problems of optaplanner

指针与数组

Notes of Teacher Li Hongyi's 2020 in-depth learning series 2

The new version of SSM video tutorial in shangsilicon valley was released

With screen and nohup running, there is no need to worry about deep learning code anymore | exiting the terminal will not affect the operation of server program code

Beisen prospectus: the advantages of the track are prominent, and integration + medium and large customers are plus points
随机推荐
WP wechat export chat record backup to computer
Go basic notes_ 4_ map
[nuxt 3] (x) runtime configuration
Analyzing the principle of DNS resolution in kubernetes cluster
LP liquidity pledge mining system development detailed procedure
91. (leaflet chapter) leaflet situation plotting - offensive direction drawing
RS note: industry recommendation system YouTube DNN model (recall layer + sorting layer) [2016 youtube]
[Nuxt 3] (十)运行时配置
JS ------ Chapter II JS logic control
痞子衡嵌入式:MCUXpresso IDE下将源码制作成Lib库方法及其与IAR,MDK差异
Browser cache
Pointers and arrays
给生活加点惊喜,做创意生活的原型设计师丨编程挑战赛 x 选手分享
Understanding complexity and simple sorting operation
Weekly summary (*66): next five years
Paper time review MB2: build a behavior model for autonomous databases
Answers to some problems encountered in the process of Xperia XZ (f8332) brushing and root
Shardingsphere database sub database sub table introduction
.net redis client newlife.redis.core library usage
The laneatt code is reproduced and tested with the video collected by yourself