mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-27 23:54:24 +02:00
🏗️ Sets environment in Docker, and adds recompile watcher to start script
Ensures environment is correctly set to production, and sets build-and-start script to now recompoile when conf.yml is updated
This commit is contained in:
parent
e75b0c780f
commit
01af5fb5b4
@ -4,6 +4,7 @@ FROM node:lts-alpine
|
|||||||
ENV PORT 80
|
ENV PORT 80
|
||||||
ENV DIRECTORY /app
|
ENV DIRECTORY /app
|
||||||
ENV IS_DOCKER true
|
ENV IS_DOCKER true
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
# Create and set the working directory
|
# Create and set the working directory
|
||||||
WORKDIR ${DIRECTORY}
|
WORKDIR ${DIRECTORY}
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
dashy:
|
dashy:
|
||||||
|
# Set any environmental variables
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
||||||
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
|
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
|
||||||
# build: .
|
# build: .
|
||||||
image: lissy93/dashy
|
image: lissy93/dashy
|
||||||
@ -16,10 +19,12 @@ services:
|
|||||||
# environment:
|
# environment:
|
||||||
# - UID=1000
|
# - UID=1000
|
||||||
# - GID=1000
|
# - GID=1000
|
||||||
|
# Specify restart policy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
# Configure healthchecks
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'node', '/app/services/healthcheck']
|
test: ['CMD', 'node', '/app/services/healthcheck']
|
||||||
interval: 1m30s
|
interval: 1m30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
"start": "node server",
|
"start": "node server",
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint --fix",
|
"lint": "vue-cli-service lint",
|
||||||
"pm2-start": "npx pm2 start server.js",
|
"pm2-start": "npx pm2 start server.js",
|
||||||
"build-watch": "vue-cli-service build --watch",
|
"build-watch": "vue-cli-service build --watch --mode production",
|
||||||
"build-and-start": "npm-run-all --parallel build start",
|
"build-and-start": "npm-run-all --parallel build-watch start",
|
||||||
"validate-config": "node src/utils/ConfigValidator",
|
"validate-config": "node src/utils/ConfigValidator",
|
||||||
"health-check": "node services/healthcheck"
|
"health-check": "node services/healthcheck"
|
||||||
},
|
},
|
||||||
@ -84,4 +84,4 @@
|
|||||||
"> 1%",
|
"> 1%",
|
||||||
"last 2 versions"
|
"last 2 versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user