Skip to content

Commit

Permalink
Changed docker-compose.yml the example env and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianFun123 committed Sep 20, 2021
1 parent 40c850b commit 5b1e69c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=3306

AUTH_PROVIDER=NONE
SERVER_NAME=

INTERAAPPS_AUTH_KEY=
INTERAAPPS_AUTH_ID=
OAUTH2_INTERAAPPS_CLIENT_ID=NONE
OAUTH2_INTERAAPPS_CLIENT_SECRET=

OAUTH2_GITHUB_CLIENT_ID=NONE
OAUTH2_GITHUB_CLIENT_SECRET=

OAUTH2_GOOGLE_CLIENT_ID=NONE
OAUTH2_GOOGLE_CLIENT_SECRET=

OAUTH2_DISCORD_CLIENT_ID=NONE
OAUTH2_DISCORD_CLIENT_SECRET=

OAUTH2_TWITCH_CLIENT_ID=NONE
OAUTH2_TWITCH_CLIENT_SECRET=
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ You want to share some code to your friends or just save it for yourself? Just p
- [Custom Docker-Compose (Using Docker-Hub)](#custom-docker-compose-using-docker-hub)
- [Kubernetes](#Kubernetes)
- [Container-Less](#Container-Less)
- [Configuration](#Configuration)
- [Develop](#Develop)
- [API](#API)

Expand Down Expand Up @@ -87,6 +88,33 @@ java -jar backend/target/backend.jar
```
Using intelliJ? Look at [Develop](#Develop)

## Configuration
### Basic Stuff
```properties
http.server.port=1337
HTTP_SERVER_CORS=*

DATABASE_DRIVER=mysql
DATABASE_NAME=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=3306

SERVER_NAME=http://example.com
```
### Adding login
You can choose between [INTERAAPPS](https://accounts.interaapps.de/developers/projects) (best integration), [GOOGLE](https://support.google.com/cloud/answer/6158849?hl=en), [GITHUB](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app), [DISCORD](https://discord.com/developers/docs/topics/oauth2) or [TWITCH](https://dev.twitch.tv/docs/authentication) for the provider (You can use all of them at the same time).
```properties
OAUTH2_${provider}_CLIENT_ID=${client_id}
OAUTH2_${provider}_CLIENT_SECRET=${client_secret}
```
#### Example
```properties
OAUTH2_INTERAAPPS_CLIENT_ID=dan3q9n
OAUTH2_INTERAAPPS_CLIENT_SECRET=ASDFASDF
```

## Develop
#### Build frontend into the backend
```bash
Expand Down
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ services:
DATABASE_PASSWORD: pastefy
DATABASE_HOST: db
DATABASE_PORT: 3306
AUTH_PROVIDER: NONE
INTERAAPPS_AUTH_KEY:
INTERAAPPS_AUTH_ID:
SERVER_NAME:
# There is INTERAAPPS, GOOGLE, GITHUB, DISCORD, TWITCH
OAUTH2_PROVIDER_CLIENT_ID:
OAUTH2_PROVIDER_CLIENT_SECRET:

volumes:
dbvol:

0 comments on commit 5b1e69c

Please sign in to comment.