R
Railwayβ€’17mo ago
devhulk

Long build for dockerfile repo. (Timeout / Error)

My project has 3 services. Go api, Vue front-end, and Postgres db. I just tried to deploy my vue front end using the Dockerfile method. The dockerfile was detected and build started. Seems to be hanging, substantially longer then my go service (currently at over 10 minutes). Is this normal for dockerfile based services? I built and ran the container locally and it ran fine but I know that doesn't really count for much lol. Update: As I was typing the build timed out. Project ID: b81f89f4-597d-4085-b8be-913321a3b926 Github Repo: https://github.com/devhulk/tasks-frontend
GitHub
GitHub - devhulk/tasks-frontend
Contribute to devhulk/tasks-frontend development by creating an account on GitHub.
22 Replies
Percy
Percyβ€’17mo ago
Project ID: b81f89f4-597d-4085-b8be-913321a3b926
Brody
Brodyβ€’17mo ago
please send the dockerfile
devhulk
devhulkOPβ€’17mo ago
FROM node:latest as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build

FROM nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
FROM node:latest as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build

FROM nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
I also added the link for the whole repo including the docker and nginx files in the description just in case. Thanks for the help!
Brody
Brodyβ€’17mo ago
ill start off by saying kudos to you for not running your vue app in dev mode when on railway
devhulk
devhulkOPβ€’17mo ago
haha thanks, didn't seem like the best idea. Plus i was curious how railway would handle the nginx piece.
Brody
Brodyβ€’17mo ago
what part of the dockerfile does it seem to hang on?
devhulk
devhulkOPβ€’17mo ago
the logs stopped here
Brody
Brodyβ€’17mo ago
how long does it take to build locally? the docker image
devhulk
devhulkOPβ€’17mo ago
a few seconds
devhulk
devhulkOPβ€’17mo ago
42.9s to be exact
Brody
Brodyβ€’17mo ago
odd, i will look into this for you a little later
devhulk
devhulkOPβ€’17mo ago
no worries take your time, I got to finish the CRUD portion of my web service anyway so no shortage of things to work on πŸ‘πŸ½
Brody
Brodyβ€’17mo ago
@devhulk tagging for visibility
devhulk
devhulkOPβ€’17mo ago
testing now
devhulk
devhulkOPβ€’17mo ago
I just merged and redeployed, waiting on dns to catch up. Still getting
devhulk
devhulkOPβ€’17mo ago
Taking longer then usual though, usually just took 30 sec
Brody
Brodyβ€’17mo ago
have you set a PORT service variable to 8080?
devhulk
devhulkOPβ€’17mo ago
I just did, missed that from your git message. Rebuilding now.
devhulk
devhulkOPβ€’17mo ago
devhulk
devhulkOPβ€’17mo ago
We are up and running! Appreciate it. I'm reading through your solution, may have more questions about why this works. Cool if I ping you on that stuff?
Brody
Brodyβ€’17mo ago
no pings (server rules) but for sure, ask away, I'd be happy to answer
Want results from more Discord servers?
Add your server