-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a0487a
commit 2228d58
Showing
82 changed files
with
14,932 additions
and
747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Check Code Quality | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
check-lint-and-build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install packages | ||
run: npm install | ||
|
||
- name: Check linting | ||
run: npm run lint:check | ||
|
||
- name: Check build | ||
run: npm run db:generate | ||
|
||
- name: Check build | ||
run: npm run build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ lerna-debug.log* | |
# Package | ||
/yarn.lock | ||
/pnpm-lock.yaml | ||
/package-lock.json | ||
|
||
# IDEs | ||
.vscode/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: '3.3' | ||
|
||
services: | ||
minio: | ||
container_name: minio | ||
image: quay.io/minio/minio | ||
networks: | ||
- evolution-net | ||
command: server /data --console-address ":9001" | ||
restart: always | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
- MINIO_ROOT_USER=USER | ||
- MINIO_ROOT_PASSWORD=PASSWORD | ||
- MINIO_BROWSER_REDIRECT_URL=http:/localhost:9001 | ||
- MINIO_SERVER_URL=http://localhost:9000 | ||
volumes: | ||
- minio_data:/data | ||
expose: | ||
- 9000 | ||
- 9001 | ||
|
||
volumes: | ||
minio_data: | ||
|
||
|
||
networks: | ||
evolution-net: | ||
name: evolution-net | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,56 @@ | ||
FROM node:20-alpine AS builder | ||
|
||
RUN apk add git wget curl bash | ||
RUN apk update && \ | ||
apk add git wget curl bash openssl | ||
|
||
LABEL version="2.2.1" description="Api to control whatsapp features through http requests." | ||
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" | ||
LABEL contact="[email protected]" | ||
|
||
WORKDIR /evolution | ||
|
||
COPY ./package.json ./tsconfig.json ./ | ||
RUN npm install --omit=dev | ||
|
||
RUN rm -rf /var/cache/apk/* | ||
RUN npm install | ||
|
||
COPY ./src ./src | ||
COPY ./public ./public | ||
COPY ./prisma ./prisma | ||
COPY ./.env.example ./.env | ||
COPY ./runWithProvider.js ./ | ||
COPY ./tsup.config.ts ./ | ||
|
||
COPY ./Docker ./Docker | ||
|
||
RUN chmod +x ./Docker/scripts/* && dos2unix ./Docker/scripts/* && \ | ||
./Docker/scripts/generate_database.sh && \ | ||
npm run build | ||
RUN chmod +x ./Docker/scripts/* && dos2unix ./Docker/scripts/* | ||
|
||
RUN ./Docker/scripts/generate_database.sh | ||
|
||
RUN npm run build | ||
|
||
FROM node:20-alpine AS final | ||
|
||
RUN apk add git wget curl bash | ||
RUN apk update && \ | ||
apk add tzdata bash openssl | ||
|
||
ENV TZ=America/Sao_Paulo | ||
|
||
WORKDIR /evolution | ||
|
||
COPY --from=builder /evolution ./ | ||
COPY --from=builder /evolution/package.json ./package.json | ||
COPY --from=builder /evolution/package-lock.json ./package-lock.json | ||
|
||
COPY --from=builder /evolution/node_modules ./node_modules | ||
COPY --from=builder /evolution/dist ./dist | ||
COPY --from=builder /evolution/prisma ./prisma | ||
COPY --from=builder /evolution/public ./public | ||
COPY --from=builder /evolution/.env ./.env | ||
COPY --from=builder /evolution/Docker ./Docker | ||
COPY --from=builder /evolution/runWithProvider.js ./runWithProvider.js | ||
COPY --from=builder /evolution/tsup.config.ts ./tsup.config.ts | ||
|
||
ENV DOCKER_ENV=true | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/bin/bash", "-c", "npm run start:prod" ] | ||
ENTRYPOINT ["/bin/bash", "-c", ". ./Docker/scripts/deploy_database.sh && npm run start:prod" ] |
Oops, something went wrong.