Skip to content

Commit

Permalink
Add fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunagatov committed Sep 30, 2023
1 parent fc1e325 commit 41ef0d4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
APP_ENV=dev
APP_VERSION=0.0.1-SNAPSHOT
#HUB=zufarexplainedit
HUB=shvedvp
TAG=1.0.0-environments
HUB=zufarexplainedit
TAG=1.0.0
DATASOURCE_URL=jdbc:postgresql://postgresdb:5432/testdb?serverTimezone=UTC
DATASOURCE_USERNAME=postgres
DATASOURCE_PASSWORD=postgres
Expand Down
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#
# Build stage with Maven
#
FROM maven:3.8.3-openjdk-17 as maven_build
ENV HOME=/opt/app
WORKDIR $HOME
Expand All @@ -14,15 +16,21 @@ RUN set -ex; \
mvn versions:set-property -Dproperty=project.version -DnewVersion=${APP_VERSION} && \
mvn package -P${APP_ENV} -DskipTests

#
# Production stage
#
FROM eclipse-temurin:17-jre-jammy as prod
WORKDIR /opt/app
RUN apt-get update && apt-get install -y netcat && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y netcat && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=maven_build /opt/app/target/*.jar /opt/app/app.jar
COPY --from=maven_build /opt/app/.env /opt/app/.env
COPY --from=maven_build /opt/app/docker/docker-entrypoint.sh /opt/app/docker-entrypoint.sh
RUN chmod +x /opt/app/docker-entrypoint.sh

# Set the entrypoint
#
# Entrypoint
#
ENTRYPOINT ["/opt/app/docker-entrypoint.sh"]
10 changes: 5 additions & 5 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server.ssl.key-alias=zufarkeystore
server.ssl.enabled=false
server.tomcat.accept-count=100

# Spring Config
# Spring Config
spring.application.name=Online Store Application
spring.banner.charset=UTF-8
spring.banner.location=classpath:banner.txt
Expand All @@ -24,23 +24,23 @@ spring.liquibase.user=${DATASOURCE_USERNAME}
spring.liquibase.password=${DATASOURCE_PASSWORD}
spring.config.import=optional:stripe.yaml

# SpringDoc Config
# SpringDoc Config
springdoc.api-docs.path=/api/docs/schema
springdoc.swagger-ui.path=/api/docs/swagger-ui

# Management Config
# Management Config
management.server.port=${SERVER_PORT}
management.endpoint.prometheus.enabled=false
management.endpoint.shutdown.enabled=true
management.endpoints.web.exposure.include=health,shutdown,prometheus
management.prometheus.metrics.export.enabled=false
management.metrics.tags.application=${spring.application.name}

# JWT Config
# JWT Config
jwt.header=Authorization
jwt.secret=404E635266556A586E3272357538782F413F4428472B4B6250645367566B5970
jwt.expiration=6044800

# Logging Config
# Logging Config
logging.pattern.file=online-store-%d{yyyy-MM-dd}.%i.log
logging.config=classpath:logback-spring.xml

0 comments on commit 41ef0d4

Please sign in to comment.