2022-10-17 04:35:12 +00:00
|
|
|
FROM node:18-alpine3.16 as build
|
2022-10-12 01:19:33 +00:00
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
COPY ["package.json", "package-lock.json", "./"]
|
|
|
|
|
2022-10-17 04:35:12 +00:00
|
|
|
RUN npm install --quiet
|
2022-10-12 01:19:33 +00:00
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN npm run build
|
|
|
|
|
2022-10-28 00:39:12 -04:00
|
|
|
FROM node:18-alpine3.16
|
2022-10-12 01:19:33 +00:00
|
|
|
|
2022-12-28 20:04:14 -05:00
|
|
|
LABEL org.opencontainers.image.title="Nostream"
|
2022-12-24 15:44:38 -05:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/Cameri/nostream
|
|
|
|
LABEL org.opencontainers.image.description="nostream"
|
2022-10-18 23:58:40 -04:00
|
|
|
LABEL org.opencontainers.image.authors="Ricardo Arturo Cabral Mejía"
|
|
|
|
LABEL org.opencontainers.image.licenses=MIT
|
|
|
|
|
|
|
|
|
2022-10-12 01:19:33 +00:00
|
|
|
ENV DB_HOST=localhost
|
|
|
|
ENV DB_PORT=5432
|
|
|
|
ENV DB_NAME=nostr-ts-relay
|
|
|
|
ENV DB_USER=nostr-ts-relay
|
|
|
|
ENV DB_PASSWORD=nostr-ts-relay
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=build /build/dist .
|
|
|
|
|
2022-10-17 04:35:12 +00:00
|
|
|
RUN npm install --omit=dev --quiet
|
2022-10-12 01:19:33 +00:00
|
|
|
|
|
|
|
USER 1000:1000
|
|
|
|
|
|
|
|
CMD ["node", "src/index.js"]
|