ci/cd
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Elizabeth Hunt 2024-05-01 00:46:57 -07:00
parent bd9fcb53a5
commit 49eb223d9a
Signed by: simponic
GPG Key ID: 2909B9A7FF6213EE
4 changed files with 27 additions and 1 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
node_modules/**
Dockerfile
*.env
.env
.git
build/

View File

@ -4,6 +4,15 @@ type: docker
name: default
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: gitea_packpub_username
password:
from_secret: gitea_packpub_password
registry: git.simponic.xyz
repo: git.simponic.xyz/simponic/mistymountains
- name: deploy
image: fedora:39
commands:

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:18-alpine
COPY package*.json ./
USER node
RUN npm install
COPY --chown=node:node . .
RUN npm run build
EXPOSE 3000
CMD [ "node", "build/index.js" ]

View File

@ -5,6 +5,6 @@ set -e
echo $SSH_KEY | base64 -d >> /tmp/key
chmod -R 0600 /tmp/key
ssh -i /tmp/key -o StrictHostKeyChecking=no $HOST "cd /home/lizzy/mistymountains && git pull && git reset --hard origin/master && npm run build && sudo systemctl restart mmt"
ssh -i /tmp/key -o StrictHostKeyChecking=no $HOST "sudo systemctl restart docker-compose@mmt"
rm /tmp/key