
@badkins I finally got to trying your script. I was able to use it to get all the pieces other than your app to build/install on an EC2 instance. Now the question is how to deploy your app. What I did so far was cd into ~deploy and do a git clone of your RacketCon repo. I had to create a symlink for raco since there was only a symlink for racket. I went into RacketCon/TodoApp and did ./run-tests and was doing Ok until it got to this point and then things started failing. I’m sure I’m not putting something in the right place. Where exactly does TodoApp go?

@gknauth The axio-env.rkt
file is kept outside of source control since there are secrets in it. I provide an example file that can be edited and renamed to axio-env.rkt

I think that may be what you’re running into.

I see. Thanks!

I think the location of the app is only important for two things: 1) The nginx config file will refer to the …/public directory as the root of the website, and 2) systemd will need to know where app.rkt lives.

Roger

Is the systemd setup done manually for the app.rkt? I don’t see it in the script. Maybe I’m blind.

Yes, manually. The repo has an example systemd config file.

Just found it, thanks.

Since the systemd.service example mentions /home/deploy/RacketCon2020/TodoApp twice, I got a little mixed up because racket-cloud-setup.bash has server root /home/$USERNAME/$APP_NAME/current/public, which is different. I guess I could have a symlink $APP_NAME/current point to /home/deploy/RacketCon2020/TodoApp.

I’d probably just edit the systemd config to where the app lives.

Ok

I’m glad your script installs emacs-nox, makes my life a lot easier.

The scripts were mostly cobbled together from existing apps, and meant to serve as an example vs. an actual bootstrap :)

The reason I made the symlink was I ran your script first, which set up all the nginx stuff, and only later saw there were other things I’d have to change to where things really were.

Looks like I have to install some other things. raco test: 13 "./axio/axio-init-structs.rkt"
standard-module-name-resolver: collection not found
for module path: gregor
collection: "gregor"

Yes. I’m not sure of the best way to ask Racket about the packages that the Todo app depends on.

I probably should’ve mad the Todo app a package, then it would probably be more straightforward.

Hmm… raco show-dependencies
doesn’t seem to do it.

raco test: 13 "./models/comment.rkt"
standard-module-name-resolver: collection not found
for module path: csv-writing
collection: "csv-writing"

You may need csv-writing
, threading

yup :)

raco make todo-app.rkt
should identify all the missing pieces I would think

Funny about dependencies, in the Scala world I built something to build a shared-library-like set of paths for JARs based on coursier. Been there.