diff --git a/.gitea/workflows/docker-image.yaml b/.gitea/workflows/docker-image.yaml new file mode 100644 index 0000000..993ec09 --- /dev/null +++ b/.gitea/workflows/docker-image.yaml @@ -0,0 +1,21 @@ +name: Build and push image for websocket http cache + +on: + push: + branches: [main] + +jobs: + docker: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + name: Check out code + + - name: Build Docker image + run: docker buildx build . -t gitea.chromart.cc/martin/websocket-http-cache:v1 -t gitea.chromart.cc/martin/websocket-http-cache:latest + + - name: Login to Docker + run: echo -n '${{ secrets.PASSWORD }}' | docker login gitea.chromart.cc --username ${{ secrets.USERNAME }} --password-stdin + + - name: Push Docker image + run: docker image push --all-tags gitea.chromart.cc/martin/websocket-http-cache diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fe6779f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM oven/bun + +ADD src src +ADD bun.lockb bun.lockb +ADD package.json package.json + +# install all deps +RUN bun install +WORKDIR /home/bun/app + +# start server +CMD bun run ./src/server.ts \ No newline at end of file