Browse Source

Add Procfile to explicitly define start command for DigitalOcean

drawing-pad
Stephanie Gredell 1 month ago
parent
commit
8430ec79ed
  1. 8
      .do/app.yaml
  2. 2
      backend/Procfile
  3. 2
      backend/package.json

8
.do/app.yaml

@ -7,11 +7,11 @@ services:
source_dir: backend source_dir: backend
github: github:
repo: codegirl-007/kiddos repo: codegirl-007/kiddos
branch: main branch: master
deploy_on_push: true deploy_on_push: true
build_command: npm install && npm run build build_command: npm install && npm run build
run_command: npm run migrate && npm start run_command: npm start
environment_slug: node-js environment_slug: node-js
instance_size_slug: basic-xxs instance_size_slug: basic-xxs
@ -55,8 +55,8 @@ static_sites:
- name: frontend - name: frontend
source_dir: frontend source_dir: frontend
github: github:
repo: YOUR_GITHUB_USERNAME/kiddos repo: codegirl-007/kiddos
branch: main branch: master
deploy_on_push: true deploy_on_push: true
build_command: npm install && npm run build build_command: npm install && npm run build

2
backend/Procfile

@ -0,0 +1,2 @@
web: npm start

2
backend/package.json

@ -5,7 +5,7 @@
"scripts": { "scripts": {
"dev": "nodemon --exec tsx src/index.ts", "dev": "nodemon --exec tsx src/index.ts",
"build": "tsc", "build": "tsc",
"start": "node dist/index.js", "start": "tsx src/db/migrate.ts && node dist/index.js",
"migrate": "tsx src/db/migrate.ts", "migrate": "tsx src/db/migrate.ts",
"seed": "tsx src/db/seed.ts" "seed": "tsx src/db/seed.ts"
}, },

Loading…
Cancel
Save