Andreas Svanberg 87d6bd594c Provide an embedded Docker container for local development ()
Allow developers to add this as a service to their Docker Compose file to enable local OAuth 2.0 flows.

See the following example:
```
services:
  oauth2:
    build: https://gitea.dsv.su.se/DMC/oauth2-authorization-server.git
    restart: unless-stopped
    ports:
      - "<host_port>:8080"
    environment:
      CLIENT_ID=awesome-app
      CLIENT_SECRET=p4ssw0rd
      CLIENT_REDIRECT_URI=http://localhost/oauth2/callback
```

Reviewed-on: 
2025-03-26 18:51:20 +01:00

28 lines
720 B
Markdown

## Using as an embedded Docker Compose service
```
services:
oauth2:
build: https://gitea.dsv.su.se/DMC/oauth2-authorization-server.git
restart: unless-stopped
ports:
- "<host_port>:8080"
environment:
CLIENT_ID=awesome-app
CLIENT_SECRET=p4ssw0rd
CLIENT_REDIRECT_URI=http://localhost/oauth2/callback
```
## Development
### Prerequisites
- JDK 17 (or later)
- Docker
- Docker compose 2.24.0 (or later)
Run `mvnw spring-boot:run` to start the application.
If running via IntelliJ or some other means make sure the "dev" Spring profile is activated.
You may have to run `mvnw compile` to generate any necessary files.
The application will be available at http://localhost:8080