Issue
I have a question, I have tried to make changes to the rest service made with SpringBoot and deploy it in EC2 with a new jar generated with mvn install -DskipTests but when running it with docker-compose up I don't see that the functionality of the service has changed. I have tried restarting the EC2 instance but nothing happens ... Is there a special way to upload a change to EC2 or do I have to do some more step that I don't know about?
I have searched the internet but I can't find the answer, that's why I come here to ask.
The change I am making is in the expiration date of a user, I have tried to change it to months, more days or others, but I do not see reflected the changes in the functionality of the service when I generate and upload a new jar with the changes (obviously before I brought the changes from github). The strange thing is that I test it locally (on my computer) and these changes in the rest service work perfectly, but when uploading it to EC2, no changes are seen.
I hope you can help me, in advance, thank you very much.
Solution
At this point I am just assuming you have:
- a Dockerfile
- a JAR <-- that you modify
- a docker-compose.yaml file
You ran once docker-compose up -d
to start and build your service. You need to run docker-compose up -d --build
for any subsequent changes to your JAR or Dockerfile otherwise docker-compose will just use the already built image. You can check that with docker image ls
Answered By - Lebenitza