0

My Vaadin spring-Boot project runs alrighty when run in IDE, but when I'm running it in docker, after navigating to adequate port, Vaadin message appears:

You are offline
Project Base for Vaadin requires an internet connection to work. You do not seem to have access to the server right now. Check your internet connection and try reloading the page to use the application.

vaadin v.23

Is this docker or vaadin related problem?

Edit: Dev-console in my browser:

enter image description here

enter image description here

Kiemoon
  • 47
  • 6
  • Have you checked the dev-console in your browser? Are there 404 errors etc? Any complains on the server-side? – cfrick Dec 13 '22 at 11:30
  • now I see that there are whole bunch. I must say that I'm a hobbyst and delpoying something in docker is already something advanced for me. – Kiemoon Dec 13 '22 at 12:08
  • Why are the port numbers changing? Have you tried multiple times and used random ports and finally fixed it on 8080? Also do you want to use docker for development (e.g. keep your system free of dev-deps) or do you want to build a produkction docker image to run somewhere else (I ask because there are logs about running a non-production-build) – cfrick Dec 13 '22 at 12:20
  • About ports. No I wasn't changing them, ut maybe it's beacuse my app connects to database. I wanted to deploy my app to render.com, where building docker image is on their side, and requires only Dockerfile from me. So I did. But result was that I was getting logs that initializing of th image was done, and after that general status of deployment was changer to failed(no log abou it). So I downloaded docker to try solve this. At this point I'm quite frustrated already, so if you know some easiest way, or have any advice I will appreciate it a lot. – Kiemoon Dec 13 '22 at 13:27
  • 3
    It looks like you didn't build the application in production mode: https://vaadin.com/docs/latest/production/production-build – Simon Martinelli Dec 13 '22 at 14:21
  • I'm using gradle, and was executing command ./gradlew clean build. There's vaadin.productionMode=true in application.properties, and productionMode = true in build.gradle. Is that an analogue for mvn clean package -Pproduction? – Kiemoon Dec 13 '22 at 14:29
  • 1
    Does this answer your question? [failed to initialize Tomcat while running Spring boot app with vaadin in docker](https://stackoverflow.com/questions/74760800/failed-to-initialize-tomcat-while-running-spring-boot-app-with-vaadin-in-docker) – Tatu Lund Dec 13 '22 at 15:58

0 Answers0