diff options
| -rw-r--r-- | .dockerignore | 6 | ||||
| -rw-r--r-- | .drone.yml | 9 | ||||
| -rw-r--r-- | Dockerfile | 11 | ||||
| -rwxr-xr-x | deploy.sh | 2 |
4 files changed, 27 insertions, 1 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1c72c96 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules/** +Dockerfile +*.env +.env +.git +build/ @@ -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: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c2feaf --- /dev/null +++ b/Dockerfile @@ -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" ] @@ -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 |
