File size: 980 Bytes
7d6d833
 
a04c70d
 
7d6d833
 
 
 
 
a04c70d
7d6d833
 
a04c70d
 
 
7d6d833
 
 
 
 
 
 
 
 
 
 
 
 
a04c70d
 
7d6d833
 
 
 
a04c70d
7d6d833
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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"]