Skip to content

Commit

Permalink
Partially port the systemd example to opam
Browse files Browse the repository at this point in the history
  • Loading branch information
aantron committed Nov 29, 2023
1 parent 41d4bb0 commit c753796
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 27 deletions.
4 changes: 2 additions & 2 deletions example/z-systemd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $ ssh root@my-droplet
Install system packages for building the app:

```
$ apt install m4 npm unzip -y
$ apt install curl m4 opam unzip -y
```

Install system packages for running the app:
Expand Down Expand Up @@ -117,7 +117,7 @@ To deploy our app, we send the sources, and then run `build.sh` and `deploy.sh`
on the droplet:

```
$ rsync -rlv . build@my-droplet:app --exclude _esy --exclude node_modules
$ rsync -rlv . build@my-droplet:app --exclude _build
$ ssh build@my-droplet "cd app && bash build.sh"
$ ssh root@my-droplet "bash /home/build/app/deploy.sh"
```
Expand Down
5 changes: 2 additions & 3 deletions example/z-systemd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
set -e
set -x

[ -f node_modules/.bin/esy ] || npm install esy
rm -f app.exe
npx esy
npx esy cp '#{self.target_dir}/default/app.exe' .
dune build
cp _build/default/app.exe .
2 changes: 0 additions & 2 deletions example/z-systemd/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(executable
(name app)
(libraries dream))

(data_only_dirs _esy esy.lock lib node_modules)
20 changes: 0 additions & 20 deletions example/z-systemd/esy.json

This file was deleted.

7 changes: 7 additions & 0 deletions example/z-systemd/systemd.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
opam-version: "2.0"

depends: [
"ocaml" {>= "4.08.0"}
"dream"
"dune" {>= "2.0.0"}
]

0 comments on commit c753796

Please sign in to comment.