diff --git a/docker-compose.yml b/docker-compose.yml index 4b35e457..aefc3098 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,6 @@ services: dockerfile: Dockerfile environment: NETWORK_MODE: bridge # Tell the app if running in `bridge` or `host` network mode - # ON_DEVICE: true # Specify that this is being deployed to hardware with Balena OS SET_HOSTNAME: "balena" # Optional. Changes the device hostname. UI will become accesible on `balena.local`. restart: always ports: diff --git a/expressjs/src/index.ts b/expressjs/src/index.ts index 2e6ad7a9..5c1d70c1 100644 --- a/expressjs/src/index.ts +++ b/expressjs/src/index.ts @@ -17,7 +17,7 @@ import Wifi from '@/routes/v1/Wifi' boot() // Set backend port number -const port = 80 +const port = process.env.BACKEND_PORT || 80 // Speed limit API requests. Useful for FileManager that can require large number of requests for // uploads and deletes, and prevents abuse of the API. diff --git a/ui/quasar.conf.js b/ui/quasar.conf.js index 00a4617d..4e1a07b3 100644 --- a/ui/quasar.conf.js +++ b/ui/quasar.conf.js @@ -51,7 +51,8 @@ module.exports = configure(function (ctx) { // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build build: { env: { - BACKEND_HOSTNAME: process.env.BACKEND_HOSTNAME + BACKEND_HOSTNAME: process.env.BACKEND_HOSTNAME, + BACKEND_PORT: process.env.BACKEND_PORT }, target: { browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], diff --git a/ui/src/components/SystemEnvConfig.vue b/ui/src/components/SystemEnvConfig.vue index b720ac03..76855487 100644 --- a/ui/src/components/SystemEnvConfig.vue +++ b/ui/src/components/SystemEnvConfig.vue @@ -197,9 +197,23 @@ export default defineComponent({ console.error('deleteEnv', error) selectedRows.value = [] }) + // Delay to allow the container to restart and avoid navigation away too early setTimeout(() => { isLoading.value = false + $q.notify({ + type: 'warning', + message: t('components.system.env_config.restarting_containers'), + timeout: 0, + actions: [ + { + label: t('general.close'), + handler: () => { + /* ... */ + } + } + ] + }) }, 4000) }