diff --git a/backend/README.md b/backend/README.md index eed9f26c44..a3fb6e8082 100644 --- a/backend/README.md +++ b/backend/README.md @@ -22,6 +22,13 @@ USING DOCKER - Run `docker-compose up` - You have to restart after every code change `docker compose restart spring` - Get the logs with `docker compose logs -f spring` +!IMPORTANT! +- If after the first start the backend is not reachable, restart the backend container with `docker compose restart spring` +- if any permission issues occur, following folders + - .angular + - frontend/dist + - frontend/node_modules + - backend/target Formatting: - Check code formatting: `mvn formatter:validate` diff --git a/backend/src/main/resources/db/data-migration/V2_0_99__newQuarterData.sql b/backend/src/main/resources/db/data-migration/V2_0_99__newQuarterData.sql index bbaff68591..d38100562f 100644 --- a/backend/src/main/resources/db/data-migration/V2_0_99__newQuarterData.sql +++ b/backend/src/main/resources/db/data-migration/V2_0_99__newQuarterData.sql @@ -174,7 +174,10 @@ values (21, 1, 13, 1, 31, 3, 'metric', null); insert into quarter (id, label, start_date, end_date) -values (8, 'GJ 23/24-Q3', '2024-01-01', '2024-03-31'); +values (8, 'GJ 23/24-Q3', '2024-01-01', '2024-03-31'), + (9, 'GJ 23/24-Q4', '2024-04-01', '2024-06-30'), + (10, 'GJ 24/25-Q1', '2024-07-01', '2024-09-30'), + (11, 'GJ 24/25-Q2', '2024-10-01', '2024-12-30'); delete from team_organisation; diff --git a/docker/local-prod/docker-compose.yml b/docker/local-prod/docker-compose.yml index 22147bcc27..80c0f41a2d 100644 --- a/docker/local-prod/docker-compose.yml +++ b/docker/local-prod/docker-compose.yml @@ -16,10 +16,17 @@ services: # SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI: https://sso.puzzle.ch/auth/realms/pitc # SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK-SET-URI: https://sso.puzzle.ch/auth/realms/pitc/protocol/openid-connect/certs SPRING_SECURITY_OAUTH2_RESOURCESERVER_OPAQUETOKEN_CLIENT-ID: pitc_okr_staging - SPRING_DATASOURCE_URL: jdbc:h2:mem:db;DB_CLOSE_DELAY=-1 + ## Postgres DB + SPRING_DATASOURCE_URL: jdbc:postgresql://okr-dev-db:5432/okr SPRING_DATASOURCE_USERNAME: user - SPRING_DATASOURCE_PASSWORD: sa - SPRING_FLYWAY_LOCATIONS: classpath:db/h2-db/database-h2-schema,classpath:db/h2-db/data-test-h2 + SPRING_DATASOURCE_PASSWORD: pwd + SPRING_FLYWAY_LOCATIONS: classpath:db/data-migration,classpath:db/migration + + ## In memory DB +# SPRING_DATASOURCE_URL: jdbc:h2:mem:db;DB_CLOSE_DELAY=-1 +# SPRING_DATASOURCE_USERNAME: user +# SPRING_DATASOURCE_PASSWORD: sa +# SPRING_FLYWAY_LOCATIONS: classpath:db/h2-db/database-h2-schema,classpath:db/h2-db/data-test-h2 volumes: - ../../../okr/backend/target:/app-root/backend depends_on: