From 80f4972d29bec123deefad00f31b1ea15fa1dee1 Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Fri, 12 May 2023 14:41:28 +0200 Subject: [PATCH] added manual docker file --- .gitea/workflows/ci.yml | 10 +++------- discord-bot/Dockerfile | 11 +++++++++++ web/Dockerfile | 9 +++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 discord-bot/Dockerfile create mode 100644 web/Dockerfile diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 51cb0d3..8bf1ffb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -28,10 +28,8 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - run: docker buildx build -t gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest --load --platform=linux/amd64 . - working-directory: ./web + - run: docker buildx build -t gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest -f ./web/Dockerfile --load --platform=linux/amd64 . - run: docker push gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest - working-directory: ./web Deploy Discord Bot: runs-on: ubuntu-latest @@ -57,7 +55,5 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - run: docker buildx build -t gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest --load --platform=linux/amd64 . - working-directory: ./discord-bot - - run: docker push gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest - working-directory: ./discord-bot + - run: docker buildx build -t gitea.xeovalyte.dev/xeovalyte/polarcraft-discord:latest -f ./discord-bot/Dockerfile --load --platform=linux/amd64 . + - run: docker push gitea.xeovalyte.dev/xeovalyte/polarcraft-discord:latest diff --git a/discord-bot/Dockerfile b/discord-bot/Dockerfile new file mode 100644 index 0000000..829047f --- /dev/null +++ b/discord-bot/Dockerfile @@ -0,0 +1,11 @@ +FROM node:18-alpine + +WORKDIR /usr/src/app + +COPY . . + +RUN npm install + +EXPOSE 3000 + +CMD [ "node", "index.js" ] diff --git a/web/Dockerfile b/web/Dockerfile new file mode 100644 index 0000000..5648f40 --- /dev/null +++ b/web/Dockerfile @@ -0,0 +1,9 @@ +FROM node:18-alpine + +WORKDIR /usr/src/app + +COPY .output . + +EXPOSE 3000 + +CMD [ "node", "server/index.mjs" ]