This commit is contained in:
prosety
2022-11-17 00:40:31 +01:00
parent ac1c0feddb
commit c335ac561d
3 changed files with 10 additions and 7 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules/
dist/

View File

@@ -18,10 +18,9 @@ steps:
- WORKDIR="/opt/pegaz/services/pegazio" - WORKDIR="/opt/pegaz/services/pegazio"
- rm -rf $WORKDIR - rm -rf $WORKDIR
- mkdir $WORKDIR - mkdir $WORKDIR
- rsync -av /drone/src/ $WORKDIR - rsync -av --exclude ./node_modules /drone/src/ $WORKDIR
- cd $WORKDIR - cd $WORKDIR
- sed -i "s|DOMAIN=.*|DOMAIN=\"$CI_DOMAIN\"|g" config.sh - sed -i "s|DOMAIN=.*|DOMAIN=\"$CI_DOMAIN\"|g" config.sh
- bash /opt/pegaz/cli.pegaz.sh build pegazio
- bash /opt/pegaz/cli.pegaz.sh up pegazio - bash /opt/pegaz/cli.pegaz.sh up pegazio
volumes: volumes:

View File

@@ -1,10 +1,12 @@
FROM node:18-alpine3.15 FROM node:18-alpine
USER root EXPOSE $PORT_EXPOSED
WORKDIR /app WORKDIR /app
COPY . .
COPY package.json package-lock.json /app/
RUN ls
RUN npm install RUN npm install
COPY . .
RUN npm run build RUN npm run build
EXPOSE 3000
CMD node dist/server/entry.mjs CMD node dist/server/entry.mjs