Docker
FROM python:3.12
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN pip install –upgrade pip && pip install -r requirements.txt
COPY . /code/
ENV PYTHONPATH “${PYTHONPATH}:/code/venv_myserver/mytool”
アプリケーションの起動コマンド
CMD [“python”, “venv_myserver/mytool/manage.py”, “runserver”, “0.0.0.0:8080”]
CMD [“gunicorn”, “–bind”, “0.0.0.0:8080”, “mytool.wsgi”]
version: ‘3’
services:
web:
container_name: promaker
build: .
ports:
– “8080:8080”
volumes:
– .:/code
tty: true
stdin_open: true
volumes:
db-store: