-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnode-sveltekit.yml
More file actions
36 lines (33 loc) · 1.31 KB
/
node-sveltekit.yml
File metadata and controls
36 lines (33 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
features:
- node lts
# - mysql
# - postgresql
# - redis
nginx:
# ---- SvelteKit default public folder ----
root: public_html/build/client
passenger:
enabled: "on"
# ---- sets NODE_ENV ----
app_env: "production"
# ---- SvelteKit has index.js in parent of root so we just use "node ." ----
app_start_command: env PORT=$PORT node .
# ---- Sets $PWD. default value is parent of root ----
# passenger_app_root: public_html/build
commands:
# ---- Change "yarn" here if needed, it will referred later as $NPM ----
- NPM=`which yarn`
- $NPM install
# ----- "adapter-auto" won't work with production build, use adapter-node! ----
- $NPM add @sveltejs/adapter-node
- sed -i "s/adapter-auto/adapter-node/g" svelte.config.js
- $NPM run build
- "[ -f .env ] || touch .env"
# ---- Choose your database stack (also uncomment related feature above) ----
# - echo "DB_CONNECTION=sqlite:////$HOME/db.sqlite" >> .env
# - echo "DB_CONNECTION=mysql://$USERNAME:$MYPASSWD@localhost/$DATABASE" >> .env
# - echo "DB_CONNECTION=postgresql://$USERNAME:$PGPASSWD@localhost/$DATABASE" >> .env
# - echo -e "REDIS_HOST=localhost\nREDIS_PORT=6479\nREDIS_PASSWORD=${DATABASE}:::${RDPASSWD}" >> .env
# ---- If you use next-auth ----
# - echo AUTH_SECRET=$(openssl rand -base64 33) >> .env
# - echo AUTH_TRUST_HOST=true >> .env