Skip to content

Commit

Permalink
Configuración para poder cambiar el Context Path
Browse files Browse the repository at this point in the history
  • Loading branch information
oxcar committed May 25, 2023
1 parent d69edac commit 2781827
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ DATABASE_PASSWORD=postgres
LOGGIN_LEVEL=INFO
# Esta variable la usa la imagen de Docker de Postgres para establecer la contraseña del usuario administrador
POSTGRES_PASSWORD=postgres
CONTEXT_PATH=/
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ ENV DATABASE_URL jdbc:postgresql://postgres/mapmap
ENV DATABASE_USER postgres
ENV DATABASE_PASSWORD postgres
ENV LOGGIN_LEVEL INFO
ENV CONTEXT_PATH /

WORKDIR /mapmap-server

COPY --from=build /mapmap-server.jar .

ENTRYPOINT java -jar /mapmap-server/mapmap-server.jar --spring.datasource.url='${DATABASE_URL}' --spring.datasource.username='${DATABASE_USER}' --spring.datasource.password='${DATABASE_PASSWORD}' --logging.level.root='${LOGGIN_LEVEL}'
ENTRYPOINT java -jar /mapmap-server/mapmap-server.jar --spring.datasource.url='${DATABASE_URL}' --spring.datasource.username='${DATABASE_USER}' --spring.datasource.password='${DATABASE_PASSWORD}' --logging.level.root='${LOGGIN_LEVEL}' --server.servlet.context-path='${CONTEXT_PATH}'
2 changes: 1 addition & 1 deletion mapmap-server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server.servlet.context-path=/mapmap
server.servlet.context-path=/
spring.datasource.url=jdbc:postgresql://localhost/mapmap
spring.datasource.username=postgres
spring.datasource.password=
Expand Down

0 comments on commit 2781827

Please sign in to comment.