Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e22c5af15 | |||
| 2550722446 | |||
| 716d98e531 | |||
| 27648c78b3 | |||
| fa72cfb5ec |
+4
-4
@@ -49,10 +49,10 @@ USER node
|
|||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
# HEALTHCHECK — Docker will restart the container if this fails 3 times
|
# HEALTHCHECK — Docker will restart the container if this fails 3 times.
|
||||||
# --no-check-certificate handles self-signed / snakeoil certs.
|
# Respects TLS_ENABLED at runtime: uses https (with --no-check-certificate
|
||||||
# Remove that flag when using a CA-signed certificate.
|
# to handle self-signed/snakeoil certs) when TLS is on, plain http when off.
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||||
CMD wget -qO- --no-check-certificate https://localhost:3001/health || exit 1
|
CMD /bin/sh -c '[ "${TLS_ENABLED:-true}" = "false" ] && wget -qO- http://localhost:${PORT:-3001}/health || wget -qO- --no-check-certificate https://localhost:${PORT:-3001}/health'
|
||||||
|
|
||||||
CMD ["node", "server/index.js"]
|
CMD ["node", "server/index.js"]
|
||||||
|
|||||||
+3
-3
@@ -47,9 +47,9 @@ services:
|
|||||||
- ALL # drop all Linux capabilities
|
- ALL # drop all Linux capabilities
|
||||||
cap_add: [] # add back none — Node.js needs no special caps
|
cap_add: [] # add back none — Node.js needs no special caps
|
||||||
healthcheck:
|
healthcheck:
|
||||||
# Uses --no-check-certificate for self-signed / snakeoil certs.
|
# Respects TLS_ENABLED: uses http when set to false, https otherwise.
|
||||||
# Remove that flag if using a CA-signed certificate.
|
# --no-check-certificate handles self-signed / snakeoil certs.
|
||||||
test: ["CMD", "wget", "-qO-", "--no-check-certificate", "https://localhost:3001/health"]
|
test: ["CMD", "/bin/sh", "-c", "[ \"${TLS_ENABLED:-true}\" = \"false\" ] && wget -qO- http://localhost:${PORT:-3001}/health || wget -qO- --no-check-certificate https://localhost:${PORT:-3001}/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sofarr",
|
"name": "sofarr",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"description": "A personal media download dashboard that shows your downloads 'so far' while you relax on the sofa waiting for your *arr services to finish",
|
"description": "A personal media download dashboard that shows your downloads 'so far' while you relax on the sofa waiting for your *arr services to finish",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+2
-1
@@ -8,6 +8,7 @@ const fs = require('fs');
|
|||||||
const http = require('http');
|
const http = require('http');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
|
const { version } = require('../package.json');
|
||||||
|
|
||||||
// Setup logging with levels
|
// Setup logging with levels
|
||||||
// Levels: debug (0), info (1), warn (2), error (3), silent (4)
|
// Levels: debug (0), info (1), warn (2), error (3), silent (4)
|
||||||
@@ -300,7 +301,7 @@ const isSnakeoil = TLS_ENABLED &&
|
|||||||
|
|
||||||
server.listen(PORT, () => {
|
server.listen(PORT, () => {
|
||||||
console.log(`=================================`);
|
console.log(`=================================`);
|
||||||
console.log(` sofarr - Your Downloads Dashboard`);
|
console.log(` sofarr v${version} - Your Downloads Dashboard`);
|
||||||
console.log(` Server running on ${protocol}://localhost:${PORT}`);
|
console.log(` Server running on ${protocol}://localhost:${PORT}`);
|
||||||
if (tlsCredentials && isSnakeoil) {
|
if (tlsCredentials && isSnakeoil) {
|
||||||
console.warn(` [TLS] Using bundled snakeoil certificate (self-signed).`);
|
console.warn(` [TLS] Using bundled snakeoil certificate (self-signed).`);
|
||||||
|
|||||||
Reference in New Issue
Block a user