-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Replace Local File Loading with Direct Upload
The local file loading has the security implication that an attacker can load arbitary files located at the server. Also removed dependencies to lambok, various JSON parsing libs and commons-lang3. Also migrated to Java 17.
- Loading branch information
1 parent
009722a
commit 3c3b467
Showing
22 changed files
with
351 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
FROM openjdk:14-ea-alpine | ||
FROM openjdk:17 | ||
|
||
ENV SPRING_PROFILES_ACTIVE=docker | ||
ARG JAR_FILE=target/icd10-dictionary.jar | ||
COPY target/icd10-dictionary.jar /app/ | ||
|
||
ENV ICD_DB_HOST=localhost | ||
ENV ICD_DB_PORT=5432 | ||
ENV ICD_DB_NAME=icd10 | ||
ENV ICD_DB_USER=postgres | ||
ENV ICD_DB_PASSWORD=password | ||
ENV ICD_POOL_SIZE=30 | ||
WORKDIR /app | ||
USER 1001 | ||
|
||
RUN apk update | ||
RUN apk upgrade | ||
RUN apk add bash | ||
RUN apk add gettext | ||
|
||
COPY ${JAR_FILE} app.jar | ||
COPY ./docker/start.sh . | ||
RUN chmod +x ./start.sh | ||
RUN mkdir config | ||
COPY ./docker/docker.template.yml config | ||
|
||
CMD ["./start.sh"] | ||
CMD ["java", "-jar", "icd10-dictionary.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '3.2' | ||
services: | ||
postgres: | ||
image: "postgres" | ||
environment: | ||
POSTGRES_DB: icd10 | ||
POSTGRES_USER: icd10 | ||
POSTGRES_PASSWORD: icd10 | ||
volumes: | ||
- "data:/var/lib/postgresql/data" | ||
|
||
icd-dictionary: | ||
build: . | ||
environment: | ||
SPRING_DATASOURCE_URL: "jdbc:postgresql://postgres:5432/icd10" | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- postgres | ||
|
||
volumes: | ||
data: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.