diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7c84d7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.11.9-slim + +RUN apt-get update + +WORKDIR /app + +COPY requirements.txt /app/requirements.txt +RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r /app/requirements.txt + +COPY . /app/ + +ENV PYTHONPATH /app + +EXPOSE 4000 + +CMD ["python", "manage.py", "runserver", "--port", "4000"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ab4e868 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: build start + +build: + docker build -t trans-forum:latest . + +start: + docker run -itd \ + -p 4000:4000 \ + -v .env:/app/.env \ + trans-forum:latest \ No newline at end of file