finish project
parent
06ec629862
commit
de982c6608
@ -0,0 +1,32 @@
|
|||||||
|
FROM node:18-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR "/app"
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
RUN npm prune --production
|
||||||
|
|
||||||
|
FROM node:18-alpine AS prod
|
||||||
|
|
||||||
|
WORKDIR "/app"
|
||||||
|
|
||||||
|
COPY --from=builder /app/package.json ./package.json
|
||||||
|
COPY --from=builder /app/package-lock.json ./package-lock.json
|
||||||
|
COPY --from=builder /app/dist ./dist
|
||||||
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|
||||||
|
ENV DB_HOST
|
||||||
|
ENV DB_PORT
|
||||||
|
ENV DB_USER
|
||||||
|
ENV DB_PASS
|
||||||
|
ENV DB_NAME
|
||||||
|
ENV JWT_SECRET
|
||||||
|
ENV JWT_EXPIRY
|
||||||
|
|
||||||
|
CMD ["sh", "-c", "DB_HOST=${DB_HOST} DB_PORT=${DB_PORT} DB_USER=${DB_USER} DB_PASS=${DB_PASS} DB_NAME=${DB_NAME} JWT_SECRET=${JWT_SECRET} JWT_EXPIRY=${JWT_EXPIRY} npm run start:prod --host 0.0.0.0"]
|
||||||
|
|
||||||
|
EXPOSE 3000
|
@ -1,16 +1,17 @@
|
|||||||
# Mx Leaderboard API
|
# Mx Leaderboard API
|
||||||
|
|
||||||
## todos
|
Basic leaderboard api using next js, mariadb and typescript.
|
||||||
|
|
||||||
- [x] user api
|
## Development
|
||||||
- [x] signup
|
|
||||||
- [x] login
|
- Copy `.env.example` to `.env`, and add relevant information
|
||||||
- [x] leaderboard api
|
- `pnpm install`
|
||||||
- [x] add 20 pts
|
- `pnpm start:dev`
|
||||||
- [x] add 60 pts
|
|
||||||
- [x] add 100 pts
|
## Deployment
|
||||||
- [x] get standings
|
|
||||||
- [x] get user score history
|
- Copy `.env.example` to `.env`, and add relevant information
|
||||||
- [x] controller tests
|
- `npm run ci`
|
||||||
- [x] user
|
- `npm run build`
|
||||||
- [x] rank
|
- `npm prune --production`
|
||||||
|
- `npm start:prod --host 0.0.0.0`
|
||||||
|
Loading…
Reference in New Issue