Skip to content
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

Tar i bruk cenv #2370

Merged
merged 5 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ build/

# Misc
.turbo/

20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,39 @@ eller send oss en mail på [webkom-styret@echo.uib.no](mailto:webkom-styret@echo

## Hvordan kjøre?

Først forventer vi at du har installert alle "dependencies" og lagt til `.env` slik det er vist under.
1. **Før du starter må du passe på at det følgende er installert:**

1. Kopier `.env.example` til `.env` og fyll inn nødvendige verdier.
- [pnpm](https://pnpm.io/installation)
- [docker](https://docs.docker.com/engine/install/)
- [cenv](https://github.com/echo-webkom/cenv)

2. **Kopier `.env.example` til `.env` og fyll inn nødvendige verdier.**

```sh
cp .env.example .env
```

1. Last ned "dependencies"
Kjør `cenv check` for å skjekke om alt er gjort riktig

3. **Last ned "dependencies"**

```sh
pnpm install
```

1. Sette opp databasen
4. **Sette opp databasen**

```sh
pnpm db:setup
```

1. Synce og seede databasen
5. **Synce og seede databasen**

```sh
pnpm seed
```

1. Start utviklingsmiljøet
6. **Start utviklingsmiljøet**

```sh
pnpm dev
Expand All @@ -72,7 +78,7 @@ Sidene som starter er:
- [http://localhost:8000](http://localhost:8000) for API-et våres
- [https://local.drizzle.studio](https://local.drizzle.studio) for Drizzle Studio

NB: "Backenden" til Drizzle vil kjøre på [http://localhost:4983](http://localhost:4983).
> NB: "Backenden" til Drizzle vil kjøre på [http://localhost:4983](http://localhost:4983).

## Relaterte prosjekter

Expand Down
95 changes: 95 additions & 0 deletions cenv.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"lastUpdated": "2024-11-11T12:53:07.131542171+01:00",
"fields": {
"ADMIN_KEY": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "ADMIN_KEY",
"value": "foobar"
},
"API_PORT": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "API_PORT",
"value": "8000"
},
"DATABASE_LOG": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "DATABASE_LOG",
"value": "true"
},
"DATABASE_URL": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "DATABASE_URL",
"value": "postgres://postgres:postgres@localhost:5432/echo-web"
},
"FEIDE_CLIENT_ID": {
"required": true,
"public": false,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "FEIDE_CLIENT_ID",
"value": ""
},
"FEIDE_CLIENT_SECRET": {
"required": true,
"public": false,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "FEIDE_CLIENT_SECRET",
"value": ""
},
"NEXTAUTH_SECRET": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "NEXTAUTH_SECRET",
"value": "foobar"
},
"NEXTAUTH_URL": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "NEXTAUTH_URL",
"value": "http://localhost:3000"
},
"NEXT_PUBLIC_API_URL": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "NEXT_PUBLIC_API_URL",
"value": "http://localhost:8000"
},
"NEXT_PUBLIC_SANITY_DATASET": {
"required": false,
"public": true,
"lengthRequired": false,
"length": 0,
"format": "",
"key": "NEXT_PUBLIC_SANITY_DATASET",
"value": "develop"
}
}
}