usmanzaheer1995 / spring-boot-demo

Learning spring boot with kotlin and gradle
5 stars 1 forks source link

Is there a way to do it with docker compose? #1

Open adi-kmt opened 7 months ago

adi-kmt commented 7 months ago

Can I use? docker compose up

usmanzaheer1995 commented 7 months ago

@adi-kmt no, unfortunately. The docker compose up command will only run a postgresql instance locally which you can use to then start the app.

You can also just do make start/db which will docker compose up.

adi-kmt commented 7 months ago

@usmanzaheer1995 make build/image/local seems to have got stuck at I'm getting an error COPY --from=builder /app/build/libs/spring-boot-demo-local.jar /app/spring-boot-demo-local.jar, getting failed to compute cache key

usmanzaheer1995 commented 7 months ago

@adi-kmt To run it locally, you can follow the steps in the Readme (making sure that you run make start/db.

It is strange that you get an error while trying to build the local image, as I just tried running it using make build/image/local on my ubuntu machine just now and it works fine.

But running it on my mac machine, i get an error while gradle is building. I will look into it.

adi-kmt commented 7 months ago

@usmanzaheer1995 got it to work on ubuntu with jdk 17 I will probably try to implement a seperate docker for postgres and push

usmanzaheer1995 commented 7 months ago

There was an issue with the alpine image not working on mac, I have finally found a fix and pushed it so should work on all platforms now.