This commit is contained in:
15
docker/Dockerfile
Normal file
15
docker/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
ARG NODE_VERSION=22
|
||||
FROM node:${NODE_VERSION}-alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS build
|
||||
ENV BASE_PATH=/
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
COPY --link ./ ./
|
||||
RUN sed -i 's|"basePath": "/"|"basePath": "'${BASE_PATH:-/}'"|' config.json
|
||||
RUN npm run build
|
||||
|
||||
FROM build AS prod
|
||||
ENV NODE_ENV=production
|
||||
CMD ["npm", "run","serve"]
|
||||
8
docker/docker-compose.labels.yml
Normal file
8
docker/docker-compose.labels.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
radar:
|
||||
labels:
|
||||
- SERVICE_3000_CHECK_HTTP=${SERVICE_3000_CHECK_HTTP:-${BASE_PATH:-/}}
|
||||
- SERVICE_3000_NAME=${SERVICE_3000_NAME:-${COMPOSE_PROJECT_NAME:-radar-3000}}
|
||||
- SERVICE_3000_TAGS=${SERVICE_3000_TAGS:-urlprefix-radar.localhost/*}
|
||||
9
docker/docker-compose.local.yml
Normal file
9
docker/docker-compose.local.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
radar:
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- ..:/app
|
||||
|
||||
12
docker/docker-compose.yml
Normal file
12
docker/docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
radar:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
environment:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
ports:
|
||||
- 3000
|
||||
restart: always
|
||||
Reference in New Issue
Block a user