Skip to content

Commit

Permalink
Added documentation on how get started
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Groß <mail@gross-johannes.de>
  • Loading branch information
jo-gross committed Nov 24, 2023
1 parent afbd831 commit b7ccc97
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/cocktail_recipe"

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
NEXTAUTH_URL=http://localhost:3000/api/auth
NEXTAUTH_SECRET=ChangeThisSecretInProduction
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
# Cocktail-Manager

## Build local for docker
## Getting started

Copy the `.env.example` file to `.env` and fill in the values.
To generate the Google OAuth credentials, go to
the [Google Developer Console](https://console.developers.google.com/apis/credentials) and create a OAuth 2.0-Client
with the following settings:

- Redirect URIs: http://localhost:3000/api/auth/callback/google

Start the database:

```bash
docker-compose up postgres -d
```

Install all dependencies:

```bash
yarn install
```

Before starting the application, you need to run the migrations (WARNING: this could drop all of your local data, pay
attention)

```bash
yarn migrate
```

Start the application:

```bash
yarn dev
```

## Docker

Build image

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "prisma generate && next build",
"start": "next start",
"format:check": "prettier --check --ignore-path .gitignore .",
"format:fix": "prettier --write --ignore-path .gitignore ."
"format:fix": "prettier --write --ignore-path .gitignore .",
"migrate": "prisma migrate reset && prisma migrate deploy"
},
"keywords": [],
"author": "",
Expand Down
5 changes: 0 additions & 5 deletions run-dev.sh

This file was deleted.

1 change: 0 additions & 1 deletion schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ generator client {
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
// url = "postgresql://postgres:postgres@postgres:5432/cocktail_recipe"
}

model Account {
Expand Down
3 changes: 0 additions & 3 deletions startup.sh

This file was deleted.

4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5521,11 +5521,11 @@ __metadata:

"typescript@patch:typescript@5.2.2#~builtin<compat/typescript>":
version: 5.2.2
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=1f5320"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca
checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554
languageName: node
linkType: hard

Expand Down

0 comments on commit b7ccc97

Please sign in to comment.