generated from bisco/codex-bootstrap
feat: add initial Docker Compose infrastructure
This commit is contained in:
22
infra/docker/backend/Dockerfile
Normal file
22
infra/docker/backend/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM python:3.13.4-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir \
|
||||
"Django==5.2.3" \
|
||||
"djangorestframework==3.16.0" \
|
||||
"gunicorn==23.0.0" \
|
||||
"psycopg[binary]==3.2.9"
|
||||
|
||||
RUN useradd --create-home --shell /usr/sbin/nologin appuser
|
||||
|
||||
COPY placeholder_wsgi.py /app/placeholder_wsgi.py
|
||||
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "placeholder_wsgi:application"]
|
||||
10
infra/docker/backend/placeholder_wsgi.py
Normal file
10
infra/docker/backend/placeholder_wsgi.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def application(environ, start_response):
|
||||
body = b"AzioneLab backend placeholder\n"
|
||||
start_response(
|
||||
"503 Service Unavailable",
|
||||
[
|
||||
("Content-Type", "text/plain; charset=utf-8"),
|
||||
("Content-Length", str(len(body))),
|
||||
],
|
||||
)
|
||||
return [body]
|
||||
Reference in New Issue
Block a user