backend-api #6

Merged
piair merged 107 commits from backend-api into main 2025-03-26 19:04:09 +01:00
8 changed files with 41 additions and 31 deletions
Showing only changes of commit e7cb8cf469 - Show all commits

View File

@ -7,7 +7,7 @@ clean:
@rm -f docker-compose.yaml @rm -f docker-compose.yaml
@rm -f .env @rm -f .env
@rm -f front/MyINPulse-front/.env @rm -f front/MyINPulse-front/.env
@rm -f MyINPulse-back/.env
# Install npm packages # Install npm packages
front/MyINPulse-front/.installed: front/MyINPulse-front/.installed:
@ -18,24 +18,28 @@ vite: ./front/MyINPulse-front/.installed
dev-front: clean vite dev-front: clean vite
@cp config/frontdev.front.env front/MyINPulse-front/.env @cp config/frontdev.env front/MyINPulse-front/.env
@cp config/frontdev.main.env .env @cp config/frontdev.env .env
@cp config/frontdev.env MyINPulse-back/.env
@cp config/frontdev.docker-compose.yaml docker-compose.yaml @cp config/frontdev.docker-compose.yaml docker-compose.yaml
@docker compose up -d --build @docker compose up -d --build
@cd ./front/MyINPulse-front/ && npm run dev @cd ./front/MyINPulse-front/ && npm run dev
prod: clean prod: clean
@cp config/prod.front.env front/MyINPulse-front/.env @cp config/prod.env front/MyINPulse-front/.env
@cp config/prod.main.env .env @cp config/prod.env .env
@cp config/prod.env .env
@cp config/prod.docker-compose.yaml docker-compose.yaml @cp config/prod.docker-compose.yaml docker-compose.yaml
@docker compose up -d --build @docker compose up -d --build
dev-back: dev-back:
@cp config/backdev.front.env front/MyINPulse-front/.env @cp config/backdev.env front/MyINPulse-front/.env
@cp config/backdev.main.env .env @cp config/backdev.env .env
@cp config/backdev.env MyINPulse-back/.env
@cp config/backdev.docker-compose.yaml docker-compose.yaml @cp config/backdev.docker-compose.yaml docker-compose.yaml
@docker compose up -d --build @docker compose up -d --build
@echo "cd MyINPulse-back" @echo "cd MyINPulse-back" && echo 'export $$(cat .env | xargs)'
@echo "./gradlew bootRun --args='--server.port=8081'" @echo "./gradlew bootRun --args='--server.port=8081'"

View File

@ -2,11 +2,8 @@ spring.application.name=myinpulse
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:7080/realms/test/protocol/openid-connect/certs spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:7080/realms/test/protocol/openid-connect/certs
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:7080/realms/test spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:7080/realms/test
logging.level.org.springframework.security=DEBUG logging.level.org.springframework.security=DEBUG
#spring.datasource.url=jdbc:postgresql://postgres/${POSTGRES_DB} spring.datasource.url=jdbc:postgresql://${DATABASE_URL}/${BACKEND_DB}
spring.datasource.url=jdbc:postgresql://localhost:5433/backend_db spring.datasource.username=${BACKEND_USER}
spring.datasource.username=backend_db_user spring.datasource.password=${BACKEND_PASSWORD}
spring.datasource.password=backend_db_user_password
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.data.rest.base-path=/my/base/path

View File

@ -12,3 +12,11 @@ KEYCLOAK_PASSWORD=keycloak_db_user_password
BACKEND_DB=backend_db BACKEND_DB=backend_db
BACKEND_USER=backend_db_user BACKEND_USER=backend_db_user
BACKEND_PASSWORD=backend_db_user_password BACKEND_PASSWORD=backend_db_user_password
DATABASE_URL=localhost:5433
VITE_KEYCLOAK_URL=http://localhost:7080
VITE_KEYCLOAK_CLIENT_ID=myinpulse
VITE_KEYCLOAK_REALM=test
VITE_APP_URL=http://localhost:8080
VITE_BACKEND_URL=http://localhost:8081/

View File

@ -1,5 +0,0 @@
VITE_KEYCLOAK_URL=http://localhost:7080
VITE_KEYCLOAK_CLIENT_ID=myinpulse
VITE_KEYCLOAK_REALM=test
VITE_APP_URL=http://localhost:8080
VITE_BACKEND_URL=http://localhost:8081/

View File

@ -11,4 +11,12 @@ KEYCLOAK_PASSWORD=keycloak_db_user_password
BACKEND_DB=backend_db BACKEND_DB=backend_db
BACKEND_USER=backend_db_user BACKEND_USER=backend_db_user
BACKEND_PASSWORD=backend_db_user_password BACKEND_PASSWORD=backend_db_user_password
DATABASE_URL=MyINPulse-DB
VITE_KEYCLOAK_URL=http://localhost:7080
VITE_KEYCLOAK_CLIENT_ID=myinpulse-dev
VITE_KEYCLOAK_REALM=test
VITE_APP_URL=http://localhost:5173
VITE_BACKEND_URL=http://localhost:8081/

View File

@ -1,5 +0,0 @@
VITE_KEYCLOAK_URL=http://localhost:7080
VITE_KEYCLOAK_CLIENT_ID=myinpulse-dev
VITE_KEYCLOAK_REALM=test
VITE_APP_URL=http://localhost:5173
VITE_BACKEND_URL=http://localhost:8081/

View File

@ -12,3 +12,11 @@ KEYCLOAK_PASSWORD=keycloak_db_user_password
BACKEND_DB=backend_db BACKEND_DB=backend_db
BACKEND_USER=backend_db_user BACKEND_USER=backend_db_user
BACKEND_PASSWORD=backend_db_user_password BACKEND_PASSWORD=backend_db_user_password
DATABASE_URL=MyINPulse-DB
VITE_KEYCLOAK_URL=https://0549cd63f912d5dc9b31278d6f.eirb.fr
VITE_KEYCLOAK_CLIENT_ID=myinpulse-eirb
VITE_KEYCLOAK_REALM=test
VITE_APP_URL=https://0549cd63f912d5dc9b31278d6f.piair.dev
VITE_BACKEND_URL=http://TODO/

View File

@ -1,5 +0,0 @@
VITE_KEYCLOAK_URL=https://0549cd63f912d5dc9b31278d6f.eirb.fr
VITE_KEYCLOAK_CLIENT_ID=myinpulse-eirb
VITE_KEYCLOAK_REALM=test
VITE_APP_URL=https://0549cd63f912d5dc9b31278d6f.piair.dev
VITE_BACKEND_URL=http://TODO/