-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnode-app.yml
More file actions
35 lines (32 loc) · 1.3 KB
/
node-app.yml
File metadata and controls
35 lines (32 loc) · 1.3 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
# This is a template for simple node server like express/koa.js
# There's should not any extra compilation step when using it.
features:
- node lts
# - mysql
# - postgresql
# - redis
nginx:
# ---- Do you have "static" folder set up? put it here. ----
root: public_html/public
passenger:
enabled: "on"
# ---- sets NODE_ENV ----
app_env: "production"
# ---- if your main script is not "app.js" change it here ----
# ---- you app MUST listen to $PORT! Change env name if needed ----
app_start_command: env PORT=$PORT node app.js
# --- Sets $PWD. default value is parent of root ---
# passenger_app_root: public_html
commands:
# ---- Change "npm" here if needed, it will referred later as $NPM ----
- NPM=`which npm`
- $NPM install
- "[ -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