Has anybody been able to deploy a Vaadin application on render using a Github repo via Docker file?
No but do you have any issues?
Umm I just wanted to know if anybody has been able to achieve that because I’ve tried and it seem not to be working for me. Most of my colleagues have suceeded deploying their Spring application using render and it seem really simple and straightforward. So wanted to know if anyone’s tried it with Vaadin and how they actually went about it.
You could use the docker file of your colleagues and try it with your Vaadin application - only thing to keep in mind: you need to active the production profile when building.
What do you mean by didn’t work?
We cannot help you if you don’t describe what the problem is
Right, I’ll give that a try.
I’m not too sure what the problem is thouht, but I’ll try to critically take my time to redu the entire process again and look at what the outcome will be and then come share the result with us. Grateful for your response and time. In the meantime, I’ll be back to share my outcome afterwards.
Its possible to deploy to render cloud platform. Host code on github repo, I used vaadin 24.4.x and docker file below.
# ---- Stage 1: Build the application ----
FROM maven:3.9.6-eclipse-temurin-17 AS builder
# Set the working directory
WORKDIR /app
# Copy project files
COPY pom.xml .
COPY src ./src
# Build the project with production profile (minimizes frontend dependencies)
RUN mvn clean package -Pproduction -DskipTests
# ---- Stage 2: Create a minimal runtime image ----
FROM eclipse-temurin:17-jre AS runtime
# Set a non-root user for security
RUN addgroup --system appgroup && adduser --system appuser --ingroup appgroup
USER appuser
# Set working directory
WORKDIR /app
# Copy the built JAR from the builder stage
COPY --from=builder /app/target/*.jar app.jar
# Expose application port
EXPOSE 8080
# Run the application
ENTRYPOINT ["java", "-jar", "app.jar"]
I hope it does work for your context.