Severian commited on
Commit
4678183
1 Parent(s): d7a6a99

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -5
Dockerfile CHANGED
@@ -68,9 +68,17 @@ COPY --from=web-builder --chown=user /app/web/.next /app/web/.next
68
  COPY --from=web-builder --chown=user /app/web/public /app/web/public
69
  COPY --from=web-builder --chown=user /app/web/package.json /app/web/package.json
70
 
71
- # Copy entrypoint script from repo
72
- COPY --from=repo --chown=user /app/docker/api/entrypoint.sh /app/entrypoint.sh
73
- RUN chmod +x /app/entrypoint.sh
 
 
 
 
 
 
 
 
74
 
75
  # Install additional Python packages
76
  RUN pip install --no-cache-dir gunicorn gevent psycopg2-binary redis
@@ -90,8 +98,8 @@ ENV FLASK_APP=app.py \
90
  USER user
91
 
92
  # Expose Hugging Face required port
93
- EXPOSE 7860
94
 
95
  WORKDIR /app
96
 
97
- CMD ["./entrypoint.sh"]
 
68
  COPY --from=web-builder --chown=user /app/web/public /app/web/public
69
  COPY --from=web-builder --chown=user /app/web/package.json /app/web/package.json
70
 
71
+ # Copy entrypoint scripts from repo
72
+ COPY --from=repo --chown=user /app/api/docker/entrypoint.sh /app/api/entrypoint.sh
73
+ COPY --from=repo --chown=user /app/web/docker/entrypoint.sh /app/web/entrypoint.sh
74
+ RUN chmod +x /app/api/entrypoint.sh /app/web/entrypoint.sh
75
+
76
+ # Create startup script
77
+ RUN echo '#!/bin/bash\n\
78
+ /app/api/entrypoint.sh & \n\
79
+ /app/web/entrypoint.sh & \n\
80
+ wait' > /app/start.sh && \
81
+ chmod +x /app/start.sh
82
 
83
  # Install additional Python packages
84
  RUN pip install --no-cache-dir gunicorn gevent psycopg2-binary redis
 
98
  USER user
99
 
100
  # Expose Hugging Face required port
101
+ EXPOSE 7860 3000
102
 
103
  WORKDIR /app
104
 
105
+ CMD ["./start.sh"]