mirror of
https://github.com/Cameri/nostream.git
synced 2025-04-12 21:59:06 +02:00
Dockerfile Additiong
This commit is contained in:
parent
855140d750
commit
b87d91cfc5
57
Dockerfile.railwayapp
Normal file
57
Dockerfile.railwayapp
Normal file
@ -0,0 +1,57 @@
|
||||
## Author Saransh Sharma @cynsar foundation
|
||||
FROM node:18-alpine3.16 as build
|
||||
|
||||
ARG DB_HOST
|
||||
ARG DB_PORT
|
||||
ARG DB_NAME
|
||||
ARG DB_USER
|
||||
ARG DB_PASSWORD
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
|
||||
COPY ["package.json", "package-lock.json","knexfile.js","./"]
|
||||
|
||||
ADD migrations /build/migrations
|
||||
|
||||
RUN mkdir ~/.nostr
|
||||
|
||||
RUN npm install -g knex@2.3.0
|
||||
|
||||
RUN npm install knex --quiet
|
||||
|
||||
RUN npm install --quiet
|
||||
|
||||
RUN npm run db:migrate
|
||||
|
||||
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18-alpine3.16
|
||||
|
||||
LABEL org.opencontainers.image.title="Nostr Typescript Relay"
|
||||
LABEL org.opencontainers.image.source=https://github.com/Cameri/nostr-ts-relay
|
||||
LABEL org.opencontainers.image.description="nostr-ts-relay"
|
||||
LABEL org.opencontainers.image.authors="Ricardo Arturo Cabral Mejía"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
## Build Setup for Railways
|
||||
ENV DB_HOST=$DB_HOST
|
||||
ENV DB_PORT=$DB_PORT
|
||||
ENV DB_NAME=$DB_NAME
|
||||
ENV DB_USER=$DB_USER
|
||||
ENV DB_PASSWORD=$DB_PASSWORD
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /build/dist .
|
||||
|
||||
RUN npm install --omit=dev --quiet
|
||||
|
||||
USER 1000:1000
|
||||
|
||||
CMD ["node", "src/index.js"]
|
Loading…
x
Reference in New Issue
Block a user