Render.com
Render is an alternative to Heroku with a free tier. We can deploy a Spring Boot app here with a Dockerfile.
Dockerfile contents
(place at root of repo, change according to artifact name, version and jdk versions)
#
# Build stage
#
FROM maven:3.8.3-openjdk-17 AS build
COPY . .
RUN mvn clean install
#
# Package stage
#
FROM eclipse-temurin:17-jdk
COPY --from=build /target/demo-0.0.1-SNAPSHOT.jar demo.jar
# ENV PORT=8080
EXPOSE 8080
ENTRYPOINT ["java","-jar","demo.jar"]
Render instructions
New -> New Web Service -> Connect Github or Gitlab -> Pick Docker runtime -> Create Web Service
Top comments (0)