feat: add docker build
This commit is contained in:
parent
3b1f0ae6f8
commit
bef9b6d46d
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
node_modules
|
||||||
|
.dockerignore
|
||||||
|
Dockerfile
|
||||||
|
|
||||||
|
/.cache
|
||||||
|
/build
|
||||||
|
.env
|
||||||
@ -5,3 +5,5 @@ OIDC_CLIENT_ID=headscale
|
|||||||
OIDC_ISSUER=https://sso.example.com
|
OIDC_ISSUER=https://sso.example.com
|
||||||
OIDC_CLIENT_SECRET=super_secret_client_secret
|
OIDC_CLIENT_SECRET=super_secret_client_secret
|
||||||
DISABLE_API_KEY_LOGIN=true
|
DISABLE_API_KEY_LOGIN=true
|
||||||
|
HOST=0.0.0.0
|
||||||
|
PORT=3000
|
||||||
|
|||||||
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM node:20-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm run build
|
||||||
|
RUN pnpm prune --prod
|
||||||
|
|
||||||
|
FROM node:20-alpine
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/build /app
|
||||||
|
COPY --from=build /app/node_modules /app/node_modules
|
||||||
|
RUN echo '{"type":"module"}' > /app/package.json
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
CMD [ "node_modules/.bin/remix-serve", "server/index.js" ]
|
||||||
@ -6,6 +6,7 @@ import tsconfigPaths from 'vite-tsconfig-paths'
|
|||||||
installGlobals()
|
installGlobals()
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: '/admin/',
|
||||||
plugins: [remix({
|
plugins: [remix({
|
||||||
basename: '/admin'
|
basename: '/admin'
|
||||||
}), tsconfigPaths()]
|
}), tsconfigPaths()]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user