Team15 / Dockerfile
Gabriel Vidal-Ayrinhac
wip
a04c70d
raw
history blame
980 Bytes
ARG MISTRAL_API_KEY
ARG ELEVENLABS_API_KEY
ARG CUSTOM_API_URL=https://mistral-ai-game-jam-team15.hf.space/api
ARG HOST=mistral-ai-game-jam-team15.hf.space
ARG API_BASE_PATH=/app
# Use Python base image as the primary environment
FROM python:3.10-alpine AS final
RUN apk add --no-cache supervisor nginx
RUN adduser -D -u 1000 user
RUN mkdir -p /home/user/nginx /home/user/nginx/tmp
RUN chown -R user:user /home/user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
WORKDIR /app
COPY --chown=user ./requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user ./src /app
COPY --chown=user ./WebGLBuild /unity
COPY nginx.conf /etc/nginx/nginx.conf
# Expose the port
EXPOSE 8080
# Copy supervisord config to manage both processes (Nginx & Uvicorn/Flask/etc.)
COPY --chown=user supervisord.conf /etc/supervisord.conf
# Start both services using supervisord
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]