Skip to content

Commit

Permalink
feat: docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
Icemap committed Jun 20, 2024
1 parent cfead7c commit eedcc69
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit eedcc69

Please sign in to comment.