Skip to content

Commit

Permalink
Merge pull request #10 from thinc-org/fix/deployment-guide
Browse files Browse the repository at this point in the history
Fix/deployment guide
  • Loading branch information
saenyakorn authored Jan 16, 2023
2 parents 38fbf2e + d4d13e3 commit a5fc0ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-tomatoes-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'thinc-discord-bot': patch
---

Fix README.md and add pnpm in final Docker image
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ COPY --chown=node:node package.json pnpm-lock.yaml ./
RUN pnpm i --frozen-lockfile --production

FROM node:18-alpine As production
RUN npm install -g pnpm
# Create app directory
WORKDIR /usr/app
# Copy the bundled code from the build stage to the production image
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ Push the code to the `main` branch, the bot will be automatically deployed to Th
To migrate the database, run the following command:

```bash
docker run -e DATABASE_URL=... --rm thinc-org/thinc-discord-bot pnpm run migrate dev
docker run -e DATABASE_URL=... --rm ghcr.io/thinc-org/thinc-discord-bot pnpm prisma migrate dev
```

To run the bot in production mode, run the following command:

```bash
docker run --env-file .env thinc-org/thinc-discord-bot
docker run --env-file .env ghcr.io/thinc-org/thinc-discord-bot
```

> You need to provide the environment variables in `.env` file.
Expand Down

0 comments on commit a5fc0ea

Please sign in to comment.