Skip to content

Commit

Permalink
change certificate file names, update readme, expose ports in docker …
Browse files Browse the repository at this point in the history
…compose
  • Loading branch information
barnhill committed Jun 28, 2024
1 parent c771924 commit e444401
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ Barcode Java API is a lightweight and easy-to-use Java library for generating ba
To use SSL:

- Mount a docker volume `/ssl` that points to a host folder that contains the SSL certificates for the server.
Name the full chain certificate as `fullchain.pem` and the private key as `privkey.pem`
- Pass the environment variable to the container: `PROFILE=prod`
Name the full chain certificate as `certificate.pem` and the private key as `key.pem`
- Pass the environment variable to the container: `PROFILE=ssl`

```
docker run --rm -p -e PROFILE=ssl 8443:8443 bradbarnhill/barcode-api
```

To use without SSL:
- Pass the environment variable to the container: `PROFILE=nossl` or pass no value for `PROFILE`

```
docker run --rm -p 8443:8443 bradbarnhill/barcode-api
docker run --rm -p 8080:8080 bradbarnhill/barcode-api
```


Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
dockerfile: Dockerfile
ports:
- "8080:8080"
- "8443:8443"
expose:
- 8080
image: bradbarnhill/barcode-api:arm64
Expand All @@ -18,6 +19,7 @@ services:
dockerfile: Dockerfile
ports:
- "8080:8080"
- "8443:8443"
expose:
- 8080
image: bradbarnhill/barcode-api:amd64
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
mavenLocal()
}
}
4 changes: 2 additions & 2 deletions src/main/resources/application-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ server:
whitelabel:
enabled: false
ssl:
certificate: /ssl/fullchain.pem
certificate-private-key: /ssl/privkey.pem
certificate: /ssl/certificate.pem
certificate-private-key: /ssl/key.pem
logging:
level:
org:
Expand Down

0 comments on commit e444401

Please sign in to comment.