- Install Java 11
- Install Docker
- Install Postgres
- Create database
apofigCREATE DATABASE apofig;
- Create user
apofigwith passwordapofigCREATE USER apofig WITH PASSWORD 'apofig';
- Grant all privileges to user
apofigGRANT USAGE ON SCHEMA public TO apofig;GRANT CREATE ON SCHEMA public TO apofig;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO apofig;ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO apofig;
- Create database
-
(Optional) To run the project locally create a file
application-local.ymlinsrc/main/resourcesfolder and override all sensitive properties fromapplication.ymlfile. This file is ignored by git. -
Start postgres database with docker. From project root folder run
docker-compose up -dcommand. -
Run
ApofigBlogApplicationclass.- set VM options:
-Dspring.profiles.active=local,nocachelocal- to useapplication-local.ymlfilenocache- to disable caching of static resources
- set environment variables:
DB_HOST=localhost DB_NAME=apofig DB_PASSWORD=apofig DB_PORT=5432 DB_USERNAME=apofig DELETE_SECRET=12345 GIT_REPO=https://github.com/your/repo.git
- set VM options:
-
Open
http://localhost:8080/blogin browser to open list of posts.
-
Please update
.envfile with correct values. -
Run
bash run-local.sh 1command to build jar, stop/start docker-compose and run application -
Run
bash run-local.sh 2command to stop/start docker-compose and run
application. Expected that jar is already built. -
Run
bash run-local.sh 3command to run application only. Expected that docker-compose is already running and jar is already built. -
Open
http://localhost:8080/blogin browser to open list of posts.
- Run
bash git-push-all.shcommand to push changes (project and site repo) to repository.