2 years ago
https://job-seeking-production.up.railway.app
I'm using spring boot application with mysql ..all process done but it application failed to respond that i hava use dockerfile
0 Replies
2 years ago
explain why you have it like that, what is uvicorn doing in a dockerfile for a spring boot app?
2 years ago
uvicorn is typically used to run fastapi python apps
2 years ago
do you use python at all in this project?
2 years ago
then I don't see the purpose of including uvicorn
2 years ago
okay
2 years ago
you said you didn't use python at all in this project, why are you using uvicorn??
2 years ago
do you use python in this project, yes or no
2 years ago
okay
2 years ago
your CMD keyword should start the java server
FROM maven:3-openjdk-17 AS build
COPY . .
RUN mvn clean package -DskipTests
FROM openjdk:17.0.1-jdk-slim
COPY --from=build /target/jobseeking-0.0.1-SNAPSHOT.war jobseeking.war
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "jobseeking.war"]
2 years ago
why even use a dockerfile? maybe nixpacks can build your app just fine
2 years ago
remove the dockerfile
2 years ago
are you building a jar file? if so, you likely have your paths wrong when you build or run the jar file
2 years ago
i strongly recommend you familurelize yourself with the technologies you are trying to use
2 years ago
same way you learn anything now-a-days, youtube videos
2 years ago
i dont know java and i dont personally watch programming youtube videos anyway
2 years ago
stack overflow
2 years ago
please read this
2 years ago
awesome
2 years ago
thank you