Jump to content

Topic on Project:Support desk

Docker is not running on cloud services as expexted

2
Khr2003 (talkcontribs)

Hi

We are trying to dockerize the new version of VideoCutTool but having few issues with the cloud service.

The first issue is that the docker process runs for few minutes then stops serving the assets of the frontend. We get `net::ERR_ABORTED 504` error.

The second issue is that the backend should run on port 4000 but instead we get `This site can’t be reached` error. I have configured the URL to open port 4000 on horizon as well as exposed it on docker file.

I run the docker container using this command:

`sudo docker-compose -f ./docker-compose.prd.yml up --build -d`

The full code to the tool can be found here: https://gerrit.wikimedia.org/r/c/labs/tools/VideoCutTool/+/716255

And this is the docker file content:

```

# Install node

FROM node:16 as build

# Install FFMPEG library

RUN apt update -y

RUN apt install ffmpeg -y

# Set the workdir /app

WORKDIR /app

# Frontend

# Copy the package.json to workdir

COPY package.json ./

COPY server/package.json ./server/

# Install dependncies

RUN npm install --legacy-peer-deps

# Copy application source

COPY . .

EXPOSE 80 4000

# run express server

# RUN node server/index.js

CMD ["npm", "run", "prd"]

# Build

RUN npm run build

# Run ngnix server

FROM nginx:1.21.4 as server

COPY --from=build /app/build /usr/share/nginx/html

```

@Tgr

Tgr (talkcontribs)

I'm not the best person to ping on Docker configuration issues.

Reply to "Docker is not running on cloud services as expexted"