-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnode-nextjs.yml
More file actions
38 lines (35 loc) · 1.36 KB
/
node-nextjs.yml
File metadata and controls
38 lines (35 loc) · 1.36 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
features:
- node lts
# - mysql
# - postgresql
# - redis
nginx:
# ---- Next.js default public folder ----
root: public_html/public
passenger:
enabled: "on"
# ---- sets NODE_ENV ----
app_env: "production"
# ---- if your main script is not "yarn start" change it here ----
app_start_command: env PORT=$PORT yarn start
# --- Sets $PWD. default value is parent of root ---
# passenger_app_root: public_html
locations:
# ---- set up proper next.js static build e-tag cache ---
- match: /_next/static/
alias: public_html/.next/static/
commands:
- 'echo "NEXT_PUBLIC_SITE_URL=\"https://${DOMAIN}\"" >> .env'
# ---- Change "yarn" here if needed, it will referred later as $NPM ----
- NPM=`which yarn`
- $NPM install
# ---- if you change the code or NEXT_PUBLIC_* env, you need to rebuild it ----
- $NPM run build
# ---- 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