Skip to content

Commit 21e7d65

Browse files
committed
Merge remote-tracking branch 'upstream/main' into issue-974-jwt-token-issuance
2 parents 9b097d9 + f13b6c6 commit 21e7d65

1,596 files changed

Lines changed: 18602 additions & 324 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
dist
3+
.git
4+
.gitignore
5+
.env
6+
*.md
7+
coverage
8+
test

backend/.env.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
NODE_ENV=development
2+
PORT=3000
3+
4+
CORS_ORIGINS=http://localhost:5173
5+
6+
DB_HOST=localhost
7+
DB_PORT=5432
8+
DB_USERNAME=postgres
9+
DB_PASSWORD=postgres
10+
DB_DATABASE=skill_sync
11+
12+
REDIS_HOST=localhost
13+
REDIS_PORT=6379

backend/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ pids
5454

5555
# Diagnostic reports (https://nodejs.org/api/report.html)
5656
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
57+
58+
# Local avatar/file uploads
59+
/uploads

backend/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:20-alpine AS builder
2+
WORKDIR /app
3+
COPY package*.json ./
4+
RUN npm ci --ignore-scripts
5+
COPY . .
6+
RUN npm run build
7+
8+
FROM node:20-alpine AS production
9+
WORKDIR /app
10+
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
11+
COPY package*.json ./
12+
RUN npm ci --omit=dev --ignore-scripts
13+
COPY --from=builder /app/dist ./dist
14+
USER appuser
15+
EXPOSE 3000
16+
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
17+
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
18+
CMD ["node", "dist/main"]

0 commit comments

Comments
 (0)