I am at a loss for what the problem is when deploying my app to Google Cloud. Here I run the Docker container on my own system:
$ docker run 829c6a550061
[2020-09-01 15:08:37 +0000] [6] [INFO] Starting gunicorn 20.0.4
[2020-09-01 15:08:37 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6)
[2020-09-01 15:08:37 +0000] [6] [INFO] Using worker: threads
[2020-09-01 15:08:37 +0000] [8] [INFO] Booting worker with pid: 8
when I click on the 'http://0.0.0.0:8080' it successfully launches the site. When I deploy to Cloud Run it gives a URL at the end and says "serving 100% traffic at such and such URL" but when I click on the URL it is a 404 error. Cloud Run says that by default the app listens on 8080. Am I missing something? Below is my Dockerfile and I attached a screenshot of Cloud Run's logs.
FROM node:13.12.0-alpine as react-build
WORKDIR /ChessKingsCouncil/react_frontend
RUN mkdir public src
COPY ./react_frontend/public ./public
COPY ./react_frontend/src ./src
COPY ./react_frontend/package.json ./
COPY ./react_frontend/package-lock.json ./
RUN npm install
RUN npm run-script build
FROM python:3.8.2
WORKDIR /ChessKingsCouncil/python_backend
ENV PYTHONPATH "${PYTHONPATH}:/app"
RUN pip install Flask
RUN pip install firebase-admin
RUN pip install gunicorn
RUN pip install termcolor
COPY ./python_backend ./
RUN mkdir build
COPY --from=react-build /ChessKingsCouncil/react_frontend/build ./build
ENV PORT 8080
CMD gunicorn --bind :$PORT --workers 1 --threads 8 app:app
-p 8080:8080
for this. I'm pretty sure that the 0.0.0.0:8080 isn't served by the container, but by another local execution! – guillaume blaquiere