diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 51a211a..aa2294c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,8 +13,8 @@ on: - master env: - REGISTRY: docker.io - IMAGE_NAME: zerob13/mock-openai-api + REGISTRY: ghcr.io + IMAGE_NAME: f213/mock-openai-api jobs: build-and-push: @@ -35,8 +35,8 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata id: meta @@ -69,4 +69,4 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} repository: ${{ env.IMAGE_NAME }} - readme-filepath: ./README.md + readme-filepath: ./README.md diff --git a/Dockerfile b/Dockerfile index eb34f0b..a5b011b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ # Build stage -FROM node:22-alpine +FROM node:22-alpine3.21 + +# Install dumb-init for proper signal handling +RUN apk add --no-cache dumb-init==1.2.5-r3 WORKDIR /app @@ -25,5 +28,7 @@ ENV PORT=3000 ENV HOST=0.0.0.0 ENV VERBOSE=true +ENTRYPOINT ["/usr/bin/dumb-init", "--"] + # Start the application with verbose logging enabled CMD ["node", "dist/index.js"]