Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +14 -28
Dockerfile
CHANGED
|
@@ -1,34 +1,20 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
RUN apt install git
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
# Set
|
| 13 |
-
ENV
|
| 14 |
-
PATH=/home/user/.local/bin:$PATH
|
| 15 |
|
| 16 |
-
# Set
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
# Switch to the "user" user
|
| 20 |
-
USER user
|
| 21 |
-
|
| 22 |
-
WORKDIR $HOME/app
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
RUN git clone https://github.com/Niansuh/Bingo.git Bingo
|
| 26 |
-
RUN chown -R user $HOME/app/Bingo
|
| 27 |
-
WORKDIR $HOME/app/Bingo
|
| 28 |
-
RUN npm install
|
| 29 |
-
RUN npm run build
|
| 30 |
-
|
| 31 |
-
ENV PORT 7860
|
| 32 |
-
EXPOSE 7860
|
| 33 |
-
|
| 34 |
-
CMD npm start
|
|
|
|
| 1 |
+
# Use the official Python base image
|
| 2 |
+
FROM python:3.8-slim
|
| 3 |
|
| 4 |
+
# Set the working directory, subsequent commands will be executed in this directory
|
| 5 |
+
WORKDIR /app
|
|
|
|
| 6 |
|
| 7 |
+
# Copy all files in the current directory to the working directory
|
| 8 |
+
COPY . /app
|
| 9 |
|
| 10 |
+
# Install Flask library
|
| 11 |
+
RUN pip install Flask
|
| 12 |
|
| 13 |
+
# Tell Docker the port number to listen on when running the container
|
| 14 |
+
EXPOSE 5000
|
| 15 |
|
| 16 |
+
# Set environment variables to ensure Flask is running in production mode
|
| 17 |
+
ENV FLASK_ENV=development
|
|
|
|
| 18 |
|
| 19 |
+
# Set the startup command to run the Flask application
|
| 20 |
+
CMD ["flask", "run", "--host=0.0.0.0"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|