Skip to content

Commit

Permalink
Merge pull request #34 from fullstack-development/fixes-docker-with-docs
Browse files Browse the repository at this point in the history
fix: docker with docs
  • Loading branch information
hersveit authored Jun 7, 2024
2 parents 71929e4 + 2435754 commit 06cd8be
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1,893 deletions.
15 changes: 1 addition & 14 deletions Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,9 @@ RUN adduser -S nestjs -u 1001

COPY --from=api --chown=nestjs:nodejs /app/api/dist ./dist
COPY --from=api --chown=nestjs:nodejs /app/api/node_modules ./node_modules
COPY --from=api --chown=nestjs:nodejs /app/api/src/swagger.yaml ./src/swagger.yaml

ENV DB_ADDRESS=$DB_ADDRESS
ENV DB_USER=$DB_USER
ENV DB_PASSWORD=$DB_PASSWORD
ENV DB_NAME=$DB_NAME
ENV DB_PORT=$DB_PORT
ENV JWT_SECRET=$JWT_SECRET
ENV JWT_EXPIRES_IN=$JWT_EXPIRES_IN
ENV PORT_API=$PORT_API
ENV JWT_REFRESH_TOKEN_SECRET=$JWT_REFRESH_TOKEN_SECRET
ENV JWT_REFRESH_TOKEN_EXPIRATION_TIME=$JWT_REFRESH_TOKEN_EXPIRATION_TIME
ENV ENVIRONMENT=$ENVIRONMENT

USER nestjs

EXPOSE 3000

CMD ["sh", "-c", "ENVIRONMENT=$ENVIRONMENT DB_ADDRESS=$DB_ADDRESS DB_USER=$DB_USER DB_PASSWORD=$DB_PASSWORD DB_NAME=$DB_NAME DB_PORT=$DB_PORT JWT_SECRET=$JWT_SECRET JWT_EXPIRES_IN=$JWT_EXPIRES_IN PORT_API=$PORT_API JWT_REFRESH_TOKEN_SECRET=$JWT_REFRESH_TOKEN_SECRET JWT_REFRESH_TOKEN_EXPIRATION_TIME=$JWT_REFRESH_TOKEN_EXPIRATION_TIME NODE_ENV=production node dist/main"]
CMD ["sh", "-c", "NODE_ENV=production node dist/main"]
2 changes: 1 addition & 1 deletion api/Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FantasyPad api
# Starter Kit api

## 1. Install deps
```bash
Expand Down
Loading

0 comments on commit 06cd8be

Please sign in to comment.