Only Nginx remains for redirects.
My studies is no longer in production use.
The following programs must be installed
- JDK 11
The following directories must exist on host machine
- ~/.m2
- ~/.gradle
This project uses code generation for the graphql api classes. To generate required classes run ./gradlew build
.
- Add following localhost alias configurations (in /etc/hosts on Linux/macOS)
127.0.0.1 local.student.helsinki.fi
127.0.0.1 local.teacher.helsinki.fi
127.0.0.1 my-studies-redis
127.0.0.1 my-studies-psql
- Docker and Docker Compose must be installed and running. Before running application or tests, start dockerized dependencies (psql and redis)
For local development:
docker-compose -f docker/local-dev/docker-compose.yml up
For local test runs:
docker-compose -f docker/local-test/docker-compose.yml up
Configuration key obar.baseUrl (local config) controls use of obar. See frontend readme for details.
To use Obar in local development, uncomment the url value from a obar.baseUrl property from application.yml. This property must be left empty when local Opintoni header is used (for instance when running e2e tests). When using local url for obar.baseUrl, Obar application must be running locally.
./gradlew bootRun
./gradlew bootRun ----debug-jvm
Instructions for running local shibboleth authentication
./gradlew test
Tests can be run in fully dockerized environment where no ports are exposed to host machine. This is intended to be used on CI machine, where multiple tests can run in parallel.
cd docker/ci
docker-compose run --entrypoint "<gradle command>" my-studies-builder
docker-compose stop
docker-compose rm -f
First start docker containers for test environment
Then run: ./gradlew build
Built jar files can be found in build/libs
directory
First start docker containers for local dev PostgreSQL and redis
Then run: java -jar build/libs/app-{VERSION_NUMBER}-SNAPSHOT.jar --spring.profiles.active=local-dev
Replace VERSION_NUMBER with an actual version number present in the jar file name in build/libs
directory.