automated push from the terminal

This commit is contained in:
Software Shinobi
2026-02-09 11:38:30 -05:00
parent 5539582a92
commit 189c6b7b26
3 changed files with 21 additions and 87 deletions

View File

@@ -1,47 +1,20 @@
FROM python:3.8
# base image
FROM python:3.8
# setup environment variable
ENV DockerHOME=/home/app/webapp
# set work directory
RUN mkdir -p $DockerHOME
# where your code lives
WORKDIR $DockerHOME
# set environment variables
ENV DockerHOME=/home/app/webapp
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED 1
RUN mkdir -p $DockerHOME
WORKDIR $DockerHOME
# install dependencies
RUN pip install --upgrade pip
# copy whole project to your docker home directory.
#RUN pip install --upgrade pip
RUN pip install "pip<24.1"
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
# run this command to install all dependencies
EXPOSE 8000
RUN pip install -r requirements.txt
RUN python3 manage.py makemigrations
RUN python3 manage.py migrate
# port where the Django app runs
EXPOSE 8000
# start server
CMD python manage.py runserver 0.0.0.0:8000
# Use a shell script or combined command for runtime tasks
CMD python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000