diff options
| author | Bobby <[email protected]> | 2023-11-10 19:44:11 -0500 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-11-10 19:44:11 -0500 |
| commit | d2419fa6a395bf8b79103064f1a7e769a0d3162f (patch) | |
| tree | f3d4fda762da70005b892ba14b97a6f5327c38c5 /Dockerfile | |
| parent | 9d0bb4593a1ea777184be4b036cdf2136958b775 (diff) | |
| download | thatcomputerscientist-d2419fa6a395bf8b79103064f1a7e769a0d3162f.tar.xz thatcomputerscientist-d2419fa6a395bf8b79103064f1a7e769a0d3162f.zip | |
Adding docker compose
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 42 |
1 files changed, 3 insertions, 39 deletions
@@ -16,54 +16,18 @@ RUN mkdir -p /shifoo WORKDIR /shifoo -# Bind database and images folders as read write. -# /home/ubuntu/database -> db.sqlite3 :: bind to /database -> db.sqlite3 in container -# /home/ubuntu/database/images -> images :: bind to /WORKDIR/images in container - -VOLUME ["/database", "/shifoo/images"] - -COPY requirements.txt . +COPY requirements.txt /shifoo/ RUN pip install -r requirements.txt -COPY . . +COPY . /shifoo/ RUN python manage.py collectstatic --noinput -RUN python manage.py makemigrations - -RUN python manage.py migrate - -EXPOSE 8080 - -CMD ["gunicorn", "--bind", ":8080", "--workers", "2", "thatcomputerscientist.wsgi"] - -# # OUTDATED -# ARG PYTHON_VERSION=3.9 - -# FROM python:${PYTHON_VERSION} - -# RUN apt-get update && apt-get install -y \ -# python3-pip \ -# python3-venv \ -# python3-dev \ -# python3-setuptools \ -# python3-wheel - -# RUN mkdir -p /app -# WORKDIR /app - -# COPY requirements.txt . -# RUN pip install -r requirements.txt - -# COPY . . - -# RUN python manage.py collectstatic --noinput +# RUN python manage.py makemigrations # RUN python manage.py migrate - # EXPOSE 8080 -# # replace APP_NAME with module name # CMD ["gunicorn", "--bind", ":8080", "--workers", "2", "thatcomputerscientist.wsgi"] |
