-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzerops.yml
More file actions
42 lines (42 loc) · 1.31 KB
/
zerops.yml
File metadata and controls
42 lines (42 loc) · 1.31 KB
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
39
40
41
42
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
- sudo mv litestream /usr/local/bin/
ports:
- port: 3000
httpSupport: true
envVariables:
NODE_ENV: production
DB_NAME: database.db
STORAGE_API_URL: $storage_apiUrl
STORAGE_ACCESS_KEY_ID: $storage_accessKeyId
STORAGE_SECRET_ACCESS_KEY: $storage_secretAccessKey
STORAGE_BUCKET_NAME: $storage_bucketName
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