Compare commits
3 Commits
a8ae5f14d4
...
013b97cec0
Author | SHA1 | Date | |
---|---|---|---|
|
013b97cec0 | ||
|
e7cb8cf469 | ||
|
184642a750 |
20
Makefile
20
Makefile
@ -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'"
|
||||||
|
|
@ -21,8 +21,8 @@ dependencies {
|
|||||||
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
|
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||||
implementation('org.springframework.boot:spring-boot-starter-validation')
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||||
implementation('org.springframework.boot:spring-boot-starter-data-rest')
|
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
|
||||||
implementation 'org.postgresql:postgresql'
|
implementation 'org.postgresql:postgresql'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
import static org.springframework.security.authorization.AuthorityAuthorizationManager.hasRole;
|
import static org.springframework.security.authorization.AuthorityAuthorizationManager.hasRole;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class WebSecurityCustomConfiguration {
|
public class WebSecurityCustomConfiguration{
|
||||||
// CORS configuration
|
// CORS configuration
|
||||||
// TODO: make sure to only accept our own domains
|
// TODO: make sure to only accept our own domains
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -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
|
|
@ -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/
|
@ -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/
|
|
@ -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=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/
|
@ -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/
|
|
@ -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/
|
@ -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/
|
|
Loading…
x
Reference in New Issue
Block a user