diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..980ad4f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +dist +node_modules +.env +chatbox +dist-components \ No newline at end of file diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml new file mode 100644 index 0000000..b9b15d1 --- /dev/null +++ b/.github/workflows/auto-build.yml @@ -0,0 +1,25 @@ +name: +on: + push: + branches: + - 'main' +jobs: + build-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Login Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Build and Push to Docker Hub + uses: docker/build-push-action@v5 + id: docker_build_client + with: + context: . + file: ./Dockerfile + builder: ${{steps.buildx.outputs.name}} + push: true + tags: dialoguebot/chatbot:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f0755e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:20 + +WORKDIR /app + +COPY package.json . + +RUN npm install + +COPY . . + +EXPOSE 3978 + +CMD [ "npm", "run", "start" ] \ No newline at end of file