Answer the question
In order to leave comments, you need to log in
How to mount an nginx image with python in docker?
What is the best way (less load on the server) to deploy a django project on a virtual server (VPS)?
Option 1: mount the nginx image and the python image via docker-compose in separate containers:
version: '3'
services:
nginx:
image: docker-nginx:latest
build:
dockerfile: deploy/nginx/Dockerfile
ports:
- 80:80
app:
image: docker-pytohn-app:latest
build:
dockerfile: deploy/python/Dockerfile
ports:
- 8000:8000
FROM nginx:1.21-alpine
...
FROM python:3.9
...
FROM nginx:1.21-alpine
...
run apt install -y python3.9
...
Answer the question
In order to leave comments, you need to log in
In separate containers as the first option. Otherwise, what's the point of raising the docker at all ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question