Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5354fa1
✨ add Date helper to format
MaloLebrin Feb 8, 2023
4a1c0a7
✨Add field born at to Employee entity
MaloLebrin Feb 8, 2023
df9f68e
✨ Add template to download answer
MaloLebrin Feb 8, 2023
5b1ca9f
✨ Get relation of answer
MaloLebrin Feb 8, 2023
d8ffcb2
✨ Add download controller
MaloLebrin Feb 8, 2023
7dcaf52
🔥 Remove unused code
MaloLebrin Feb 8, 2023
bdb9222
✨ Add config for handlebars
MaloLebrin Feb 8, 2023
0c85661
📦 Update container config
MaloLebrin Feb 9, 2023
743e509
🚧 Trying to download a answer
MaloLebrin Feb 9, 2023
ae9416a
🚧 WIP download answer
MaloLebrin Feb 10, 2023
627e917
🔀 Squashed commit of the following:
MaloLebrin May 3, 2023
5f46e95
Fix errors
MaloLebrin May 3, 2023
063170f
♻️ clean db calls
MaloLebrin May 3, 2023
6261587
🎉 Init uploads folders
MaloLebrin May 5, 2023
d40ede1
🎨 Design answer with accepted or not
MaloLebrin May 5, 2023
d72af41
🎨 Add style to signature
MaloLebrin May 9, 2023
1c4b6c1
♻️ Refacto call first send mail before notif
MaloLebrin May 9, 2023
2b04044
✨ Feature to download answer PDF
MaloLebrin May 9, 2023
12d43de
✨ Download multiple answers
MaloLebrin May 9, 2023
c924dbb
🩹 Resolve access to uploads file
MaloLebrin May 9, 2023
4539118
📚 Document max deep exceeded docker
MaloLebrin May 9, 2023
e8a4a61
✨ Add Basics helpers to parse cookies
MaloLebrin May 9, 2023
26f56e4
✨ Add auth security to download requests
MaloLebrin May 9, 2023
6c49b7b
🩹 Fix security for download answers
MaloLebrin May 9, 2023
14d226a
🎨 trying to add signature style
MaloLebrin May 9, 2023
a6a14a6
🩹 Fiw style guide errors
MaloLebrin May 9, 2023
80ac993
🔀 Squashed commit of the following:
MaloLebrin May 9, 2023
cbffdf0
⬆️ pnpm lock
MaloLebrin May 9, 2023
47852cb
Merge branch 'main' into download-answer
MaloLebrin May 9, 2023
1c3129a
🩹 Es lint errors
MaloLebrin May 9, 2023
54d3a31
🩹 fis es lint ordering
MaloLebrin May 9, 2023
a36a101
🔥 Removed unsed code
MaloLebrin May 9, 2023
4ce029a
🚀 resolve starting cron and api
MaloLebrin May 10, 2023
3309db7
⬆️ Typeorm to v0.3.16 (#229)
renovate[bot] May 11, 2023
fa00ead
delete pnpm lock
MaloLebrin May 11, 2023
3cbef0f
🗑 New clean Pnpm lock
MaloLebrin May 11, 2023
486d914
Merge branch 'main' into download-answer
MaloLebrin May 11, 2023
b9415d5
♻️ Resolve pnpm lock conflicts
MaloLebrin May 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:

- name: 🏗 Build
run: nr tsc

- name: ✅ Tests
run: nr test:ci
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
tags:
- '*'

jobs:
new-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # Checkout our working repository
jobs:
new-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # Checkout our working repository

- name: 📚 Changelog
uses: scottbrenner/generate-changelog-action@master
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ temp/
.DS_Store
flydeployement.md
Stripe.md
uploads
30 changes: 24 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
FROM node:20
FROM zenika/alpine-chrome:with-puppeteer

RUN mkdir /app
USER root

RUN git config --system --add safe.directory '*'

RUN apk add --no-cache ttf-liberation

# RUN mkdir /app
WORKDIR /app

COPY package.json /app/
COPY pnpm-lock.yaml /app/

# RUN npm install
RUN npm i -g pnpm
RUN pnpm install --no-frozen-lockfile

RUN pnpm install --no-frozen-lockfile --unsafe-perm \
&& chown -R 0:0 /app/node_modules

# RUN mkdir node_modules/.cache
# RUN chmod -R 777 node_modules/.cache
# Be careful with this env variable
ARG NODE_ENV
ENV NODE_ENV=${NODE_ENV}

# COPY .env /app/.env
COPY ormconfig.ts /app/ormconfig.ts
COPY tsconfig.json /app/
COPY entrypoint.sh /app/
# COPY entrypoint.sh /app/
COPY scriptSeed.sh /app/
COPY ./src /app/src

RUN pnpm run tsc

RUN chmod +x /app/entrypoint.sh
# RUN chmod +x /app/entrypoint.sh
RUN chmod +x /app/scriptSeed.sh
ENTRYPOINT ["/bin/bash","/app/entrypoint.sh"]

RUN chmod -R 777 /app/src/uploads
RUN chmod 777 /app/build/src/middlewares/

USER chrome
# RUN chmod +x /app/uploads

ENTRYPOINT ["node", "/app/build/src/index.js"]
# ENTRYPOINT ["/bin/bash -c","/app/entrypoint.sh"]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ Steps to run this project:
2. Run container detach mode `docker-composer up -d`
3. Enter in container `docker exec -it <container-id> bash`
4. Run scriptSeed.sh

## Delete images
`docker rmi -f $(docker images -a -q)`
6 changes: 3 additions & 3 deletions cron.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ COPY .env /app/.env
COPY ormconfig.ts /app/ormconfig.ts
COPY tsconfig.json /app/

COPY cronScript.sh /app/
# COPY cronScript.sh /app/

COPY ./src /app/src

RUN pnpm run tsc

RUN chmod +x /app/cronScript.sh
# RUN chmod +x /app/cronScript.sh

ENTRYPOINT ["/bin/bash","/app/cronScript.sh"]
ENTRYPOINT ["node", "/app/build/src/jobs/index.js"]
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ services:
- 6379

app:
restart: always
image: zenika/alpine-chrome:with-puppeteer
links:
- redis
depends_on:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dayjs": "^1.11.7",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-handlebars": "^6.0.7",
"express-pino-logger": "7.0.0",
"helmet": "^7.0.0",
"ioredis": "^5.3.2",
Expand All @@ -43,6 +44,7 @@
"pg": "^8.10.0",
"pino": "8.14.1",
"pino-pretty": "10.0.0",
"puppeteer": "^20.0.0",
"redis": "^4.6.5",
"reflect-metadata": "^0.1.13",
"ts-node": "10.9.1",
Expand Down
Loading