FEAT: try build in dcompose

This commit is contained in:
prosety
2022-11-14 10:54:26 +01:00
parent f6319ed2b7
commit ada09a7370
4 changed files with 19 additions and 11 deletions

View File

@@ -4,11 +4,14 @@ name: default
steps:
- name: build
image: node
image: docker/compose
volumes:
- name: docker
path: /var/run/docker.sock
- name: pegaz
path: /opt/pegaz
commands:
- npm install
- npm run build
- rm -rf node_modules .git
- bash /opt/pegaz/cli.pegaz.sh build pegazio
- name: deploy
image: docker/compose
@@ -25,8 +28,7 @@ steps:
- WORKDIR="/opt/pegaz/services/pegazio"
- rm -rf $WORKDIR
- mkdir $WORKDIR
- rsync -av /drone/src/ $WORKDIR
- cd $WORKDIR
- cd /drone/src/ $WORKDIR
- sed -i "s|DOMAIN=.*|DOMAIN=\"$CI_DOMAIN\"|g" config.sh
- bash /opt/pegaz/cli.pegaz.sh update pegazio

View File

@@ -1,5 +1,9 @@
FROM node:18
FROM node:18-alpine3.15
USER root
COPY ./dist /app
CMD node /app/server/entry.mjs
RUN mkdir /app
WORKDIR /app
COPY . .
RUN npm install
EXPOSE 3000
CMD cd /app && node dist/server/entry.mjs

View File

@@ -8,6 +8,8 @@ services:
restart: unless-stopped
ports:
- $PORT:$PORT_EXPOSED
volumes:
- $PWD:/app
environment:
VIRTUAL_HOST: "${DOMAIN}"
LETSENCRYPT_HOST: "${DOMAIN}"

View File

@@ -15,7 +15,7 @@
</div>
<div class="text-center py-4">
<h1 class="text-5xl font-bold leading-relaxed">
Pegaz
Pegaz.io
</h1>
<h2 class="text-3xl text-center">
Deploy stack on the go