FEAT: try build in dcompose
This commit is contained in:
14
.drone.yml
14
.drone.yml
@@ -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
|
||||
|
||||
|
12
Dockerfile
12
Dockerfile
@@ -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
|
||||
|
@@ -8,6 +8,8 @@ services:
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- $PORT:$PORT_EXPOSED
|
||||
volumes:
|
||||
- $PWD:/app
|
||||
environment:
|
||||
VIRTUAL_HOST: "${DOMAIN}"
|
||||
LETSENCRYPT_HOST: "${DOMAIN}"
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user