-
Notifications
You must be signed in to change notification settings - Fork 0
/
zerops.yml
38 lines (38 loc) · 1.11 KB
/
zerops.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
zerops:
- setup: api
build:
base: nodejs@20
prepareCommands:
- npm install -g typescript
buildCommands:
- npm i
- npm run build
deployFiles:
- ./dist
- ./node_modules
- ./package.json
- ./litestream.yml
run:
base: nodejs@20
prepareCommands:
- wget https://github.com/benbjohnson/litestream/releases/download/v0.3.13/litestream-v0.3.13-linux-amd64.tar.gz
- tar -xzf litestream-v0.3.13-linux-amd64.tar.gz
- rm litestream-v0.3.13-linux-amd64.tar.gz
- mv litestream /usr/local/bin/
ports:
- port: 3000
httpSupport: true
envVariables:
NODE_ENV: production
DB_NAME: database.db
startCommands:
- command: npm run start:prod
name: server
- command: litestream replicate -config=litestream.yml
name: replication
initCommands:
- litestream restore -if-replica-exists -if-db-not-exists -config=litestream.yml $DB_NAME
healthCheck:
httpGet:
port: 3000
path: /status