Compare commits

...

4 commits

Author SHA1 Message Date
Jamie Scott
10fb5e1f9b
Merge 92170540c6 into 81818a19d1 2024-12-29 18:25:51 -06:00
Louis Lam
81818a19d1 Update dependencies
Some checks failed
Node.js CI - Dockge / ci (22, ARM64) (push) Has been cancelled
Node.js CI - Dockge / ci (22, macos-latest) (push) Has been cancelled
Node.js CI - Dockge / ci (22, ubuntu-latest) (push) Has been cancelled
Node.js CI - Dockge / ci (22, windows-latest) (push) Has been cancelled
json-yaml-validate / json-yaml-validate (push) Has been cancelled
Node.js CI - Dockge / ci (22, ARM) (push) Has been cancelled
2024-12-26 16:22:24 +08:00
Louis Lam
1372bd2ce1 Remove the tsx workaround as it had been fixed in upstream 2024-12-26 16:22:08 +08:00
Jamie Scott
92170540c6 Build frontend during docker build 2024-10-12 13:28:23 +01:00
6 changed files with 1099 additions and 858 deletions

View file

@ -9,9 +9,9 @@ tmp
# Docker extra
docker
frontend
.editorconfig
.eslintrc.cjs
.git
.gitignore
README.md
.github
*.md

View file

@ -1,6 +1,9 @@
services:
dockge:
image: louislam/dockge:1
build:
context: .
dockerfile: docker/Dockerfile
restart: unless-stopped
ports:
# Host Port : Container Port

View file

@ -4,9 +4,19 @@
FROM louislam/dockge:build-healthcheck AS build_healthcheck
############################################
# Build
# Build frontend
############################################
FROM louislam/dockge:base AS build
FROM louislam/dockge:base AS build_frontend
WORKDIR /app
COPY --chown=node:node . .
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install && \
pnpm run build:frontend
############################################
# Install node modules
############################################
FROM louislam/dockge:base AS build_nodemodules
WORKDIR /app
COPY --chown=node:node ./package.json ./package.json
COPY --chown=node:node ./pnpm-lock.yaml ./pnpm-lock.yaml
@ -18,8 +28,9 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-l
FROM louislam/dockge:base AS release
WORKDIR /app
COPY --chown=node:node --from=build_healthcheck /app/extra/healthcheck /app/extra/healthcheck
COPY --from=build /app/node_modules /app/node_modules
COPY --chown=node:node . .
COPY --from=build_frontend /app/frontend-dist /app/frontend-dist
COPY --from=build_nodemodules /app/node_modules /app/node_modules
COPY --chown=node:node . .
RUN mkdir ./data
@ -33,7 +44,7 @@ VOLUME /app/data
EXPOSE 5001
HEALTHCHECK --interval=60s --timeout=30s --start-period=60s --retries=5 CMD extra/healthcheck
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["bash", "-c", "node ./extra/clean-tsx-tmp.js && tsx ./backend/index.ts"]
CMD ["tsx", "./backend/index.ts"]
############################################
# Mark as Nightly

View file

@ -1,13 +0,0 @@
/*
* This script is used to clean up the tmp directory.
* A workaround for https://github.com/louislam/dockge/issues/353
*/
import * as fs from "fs";
try {
fs.rmSync("/tmp/tsx-0", {
recursive: true,
});
} catch (e) {
}

View file

@ -38,14 +38,14 @@
"croner": "~8.1.2",
"dayjs": "~1.11.13",
"dotenv": "~16.3.2",
"express": "~4.21.1",
"express": "~4.21.2",
"express-static-gzip": "~2.1.8",
"http-graceful-shutdown": "~3.1.13",
"jsonwebtoken": "~9.0.2",
"jwt-decode": "~3.1.2",
"knex": "~2.5.1",
"limiter-es6-compat": "~2.1.2",
"mysql2": "~3.11.3",
"mysql2": "~3.12.0",
"promisify-child-process": "~4.1.2",
"redbean-node": "~0.3.3",
"semver": "^7.6.3",
@ -53,7 +53,7 @@
"socket.io-client": "~4.8.0",
"timezones-list": "~3.0.3",
"ts-command-line-args": "~2.5.1",
"tsx": "~4.6.2",
"tsx": "~4.19.2",
"type-fest": "~4.3.3",
"yaml": "~2.3.4"
},

1910
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff