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: steps:
- name: build - name: build
image: node image: docker/compose
volumes:
- name: docker
path: /var/run/docker.sock
- name: pegaz
path: /opt/pegaz
commands: commands:
- npm install - bash /opt/pegaz/cli.pegaz.sh build pegazio
- npm run build
- rm -rf node_modules .git
- name: deploy - name: deploy
image: docker/compose image: docker/compose
@@ -25,8 +28,7 @@ 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 - cd /drone/src/ $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 update pegazio - 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 RUN mkdir /app
WORKDIR /app
CMD node /app/server/entry.mjs COPY . .
RUN npm install
EXPOSE 3000
CMD cd /app && node dist/server/entry.mjs

View File

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

View File

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