Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
IdanKoblik committed Dec 13, 2024
1 parent caf8844 commit accd54e
Show file tree
Hide file tree
Showing 4 changed files with 5,615 additions and 13 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/

# Local

**/coverage
**/.idea
**/.github
**/__tests__
**/.gitignore
**/README.md

config.json

**/.classpath
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
ARG NODE_VERSION=18.0.0
FROM node:${NODE_VERSION}-alpine

RUN apk add --no-cache --update curl ca-certificates openssl git tar bash sqlite fontconfig \
RUN apk add --no-cache --update curl ca-certificates openssl \
&& adduser --disabled-password --home /home/container container

LABEL org.opencontainers.image.authors="idankob@gmail.com"

ENV NODE_ENV production

WORKDIR /home/container
WORKDIR /app/

COPY package*.json ./
RUN npm install
COPY package*.json /app/
RUN npm ci --omit=dev
COPY . /app/

USER container

COPY . .
WORKDIR /home/container/

EXPOSE 3000

CMD ["node", "index.js"]
CMD ["node", "/app/index.js"]
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,15 @@ Create a `config.json` file in the project root with the following structure:
```json
{
"port": 3000,
"gitlabToken": "your-gitlab-webhook-token",
"webhookId": "your-discord-webhook-id",
"webhookToken": "your-discord-webhook-token"
"tokens": {
"gitlab-token": [
"discord-webhook1",
"discord-webhook2",
]
}
}
```

- `port`: The port on which the server will listen (use 3000 for Docker)
- `gitlabToken`: A random UUID that you'll set in your GitLab webhook settings
- `webhookId` and `webhookToken`: Your Discord webhook credentials

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
Expand Down
Loading

0 comments on commit accd54e

Please sign in to comment.