Initial
This commit is contained in:
commit
2ca7a264b3
53 files changed
+7113
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
FROM python:3.12-slim-bookworm@sha256:935c3c5b12357a7e10caa9c1e6ca5692344d97cf229832ef584be2cec9fc03df AS python
|
||||
FROM python AS dependencies
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN pip install --disable-pip-version-check --no-cache-dir --no-compile --require-hashes --only-binary=:all: --target=/opt/packages -r /requirements.txt
|
||||
|
||||
FROM python AS base
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONPATH=/opt/packages
|
||||
WORKDIR /app
|
||||
COPY --from=dependencies /opt/packages /opt/packages
|
||||
RUN install -d -o 10001 -g 10001 -m 0750 /data
|
||||
USER 10001:10001
|
||||
|
||||
FROM base AS worker
|
||||
COPY game/__init__.py game/worker.py game/strategy.py ./game/
|
||||
CMD ["python","-m","uvicorn","game.worker:app","--host","0.0.0.0","--port","8081","--no-server-header","--no-access-log","--limit-concurrency","64"]
|
||||
|
||||
FROM base AS web
|
||||
COPY game ./game
|
||||
CMD ["python","-m","uvicorn","game.api:app","--host","0.0.0.0","--port","8080","--no-server-header","--no-access-log","--limit-concurrency","64"]
|
||||
Reference in new issue
Block a user