biff

anselm 2024-12-01T13:54:49.672039Z

Having an issue with clj -M:dev deploy . The command runs through fine but the app isn't deployed. Running clj -M:dev logs it seems like deploy started a repl?

Dec 01 13:45:51 ubuntu-s-1vcpu-1gb-nyc1-01 sh[3428]: Clojure 1.11.1
Dec 01 13:45:52 ubuntu-s-1vcpu-1gb-nyc1-01 sh[3428]: user=>
If I ssh into the machine as the app user and then run clj -M -m com.example then the app becomes available. Any ideas what I might have screwed up?

anselm 2024-12-03T07:48:44.613369Z

💡 turns out I did mess up deps.edn. I added a test alias and accidentally put the prod alias inside of it 🙃 thanks for that!

2024-12-03T14:53:26.425829Z

awesome, glad you found the problem!

🙏 1
anselm 2024-12-01T16:40:11.149999Z

seems like this change in server-setup.sh solved the issue:

-ExecStart=/bin/sh -c "mkdir -p target/resources; clj -M:prod"
+ExecStart=/bin/sh -c "mkdir -p target/resources; clj -M -m com.example"

2024-12-01T19:47:11.094809Z

huh... have you made any changes to deps.edn? I wonder if the prod alias got messed up somehow. I'll take a look once I have a chance.

2024-12-01T19:49:20.858179Z

an issue with doing clj -M -m com.example is that it won't include the jvm opts that the prod alias sets, especially this one which affects which values in resources/config.edn are used: https://github.com/jacobobryant/biff/blob/1a1eccf8d65bf0e26adb0aab3e51c4cd4f81e138/starter/deps.edn#L22

2024-12-01T19:52:16.072249Z

though I see that the server setup script also sets BIFF_PROFILE=prod (https://github.com/jacobobryant/biff/blob/1a1eccf8d65bf0e26adb0aab3e51c4cd4f81e138/starter/server-setup.sh#L59), so the config actually should be ok with that command. still would like to figure out why the original command doesn't work of course.