Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to deploy nuxt app to digital ocean health checks

I created a simple & basic nuxt app then from the terminal, i did push it to github repo. then i did link my repo to digital ocean app functionality so it deploys it. The build is successful yet the launch doesn't launch and i get the following errors

Deploy Error: Health Checks
Common Causes
App is running slower than expected
Component Issues
apptest - failed to deploy

Please note that i didn't configure the environnement variables, i left it to default settings. is it important to do so?

enter image description here

Edit : here's nuxt js config

export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'apptest',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/bootstrap
    'bootstrap-vue/nuxt',
  ],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
  }
}

the digital ocean log is stuck here

[appnuxt] [2021-09-11 10:47:59] yarn run v1.22.11
[appnuxt] [2021-09-11 10:47:59] $ nuxt start
[appnuxt] [2021-09-11 10:48:01] ℹ Listening on: http://localhost:8080/
like image 256
Sb Zakaria Avatar asked Sep 12 '25 13:09

Sb Zakaria


1 Answers

This article was helped me with the previous setup of the Nuxt.js app: Deploy Nuxt.js on DigitalOcean App Platform

As it was mentioned there, it needs to set the run command with specifying host/port for the app (by default it launches on http://localhost:3000):

npm start -- --hostname 0.0.0.0 --port 8080
like image 185
Spirico Avatar answered Sep 15 '25 01:09

Spirico