Skip to content

Add multiple environment support and cleanup #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ web_modules/

# dotenv environment variable files
.env
.env.development
.env.development.local
.env.test.local
.env.production
.env.production.local
.env.local

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ Before you get started, make sure you have the following installed on your machi
```sh
docker compose up -d
```

2. **Install Dependencies**:

- Use pnpm to install all the necessary dependencies:
```sh
pnpm i
```

3. **Configure Environment Variables**:

- Create a `.env` file in the root directory.
- Use the provided `.env.sample` as a template to enter all the required environment variables.
- Create `.env.development` and `.env.production` files in the root directory.
- Use the provided `.env.sample` as a template to set up the environment variables in these files.

## What's Included

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "dist/main.js",
"scripts": {
"dev": "dotenv -e .env -- ts-node-dev --transpile-only ./src/main.ts",
"dev": "dotenvx run -f .env.development -- ts-node-dev --transpile-only ./src/main.ts",
"prod": "dotenvx run -f .env.production -- ts-node-dev --transpile-only ./src/main.ts",
"seeder": "ts-node --transpile-only ./src/seeder.ts",
"build": "tsup --config build.ts",
"start:prod": "dotenv -e .env -- node ./dist/main.js",
Expand Down Expand Up @@ -55,6 +56,7 @@
"@aws-sdk/client-s3": "^3.606.0",
"@bull-board/api": "^5.19.0",
"@bull-board/express": "^5.16.0",
"@dotenvx/dotenvx": "^1.14.0",
"@prisma/client": "^5.13.0",
"@types/compression": "^1.7.2",
"argon2": "^0.30.3",
Expand Down
Loading