Closed 574n13y closed 8 months ago
git clone https://github.com/574n13y/django-notes-app.git
sudo apt install docker.io
Permission denied because this user doesn’t have access to docker. So we will give this user permission. Use command:
sudo usermod -aG docker $USER $USER == current logged in user
sudo reboot
Here is the Dockerfile :
FROM python:3.9 WORKDIR /app/backend COPY requirements.txt /app/backend RUN pip install -r requirements.txt COPY . /app/backend EXPOSE 8000 CMD python /app/backend/manage.py runserver 0.0.0.0:8000
docker build -t notes-app .
docker run -d -p 8000:8000 notes-app:latest
curl -L <local_url>:<External-Ip> curl -L http://127.0.0.1:8000
updated https://github.com/574n13y/Aws/tree/dev/Deploying%20a%20web-application%20using%20Nginx%20server%20and%20Reverse%20Proxy
Task 2
sudo apt install docker.io
Permission denied because this user doesn’t have access to docker. So we will give this user permission. Use command:
sudo reboot
Here is the Dockerfile :
docker run -d -p 8000:8000 notes-app:latest