Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ out
target
*.iml
logs
attachments
*.patch


15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
## [REST API](http://localhost:8080/doc)

## Концепция:

- Spring Modulith
- [Spring Modulith: достигли ли мы зрелости модульности](https://habr.com/ru/post/701984/)
- [Introducing Spring Modulith](https://spring.io/blog/2022/10/21/introducing-spring-modulith)
- [Spring Modulith - Reference documentation](https://docs.spring.io/spring-modulith/docs/current-SNAPSHOT/reference/html/)
- [Spring Modulith: достигли ли мы зрелости модульности](https://habr.com/ru/post/701984/)
- [Introducing Spring Modulith](https://spring.io/blog/2022/10/21/introducing-spring-modulith)
- [Spring Modulith - Reference documentation](https://docs.spring.io/spring-modulith/docs/current-SNAPSHOT/reference/html/)

```
url: jdbc:postgresql://localhost:5432/jira
username: jira
password: JiraRush
```

- Есть 2 общие таблицы, на которых не fk
- _Reference_ - справочник. Связь делаем по _code_ (по id нельзя, тк id привязано к окружению-конкретной базе)
- _UserBelong_ - привязка юзеров с типом (owner, lead, ...) к объекту (таска, проект, спринт, ...). FK вручную будем проверять
- _Reference_ - справочник. Связь делаем по _code_ (по id нельзя, тк id привязано к окружению-конкретной базе)
- _UserBelong_ - привязка юзеров с типом (owner, lead, ...) к объекту (таска, проект, спринт, ...). FK вручную будем
проверять

## Аналоги

- https://java-source.net/open-source/issue-trackers

## Тестирование

- https://habr.com/ru/articles/259055/

Список выполненных задач:
Expand Down
58 changes: 29 additions & 29 deletions config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@
# https://pai-bx.com/wiki/nginx/2332-useful-redirects-in-nginx/#1
# sudo iptables -A INPUT ! -s 127.0.0.1 -p tcp -m tcp --dport 8080 -j DROP
server {
listen 80;
listen 80;

# https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration
gzip on;
gzip_types text/css application/javascript application/json;
gzip_min_length 2048;
# https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration
gzip on;
gzip_types text/css application/javascript application/json;
gzip_min_length 2048;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root /opt/jirarush/resources;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root /opt/jirarush/resources;

if ($request_uri ~ ';') { return 404; }
if ($request_uri ~ ';') {return 404;}

# proxy_cookie_flags ~ secure samesite=none;
# proxy_cookie_flags ~ secure samesite=none;

# static
location /static/ {
expires 30d;
access_log off;
}
location /robots.txt {
access_log off;
}
# static
location /static/ {
expires 30d;
access_log off;
}
location /robots.txt {
access_log off;
}

location ~ (/$|/view/|/ui/|/oauth2/) {
expires 0m;
proxy_pass http://localhost:8080;
proxy_connect_timeout 30s;
}
location ~ (/api/|/doc|/swagger-ui/|/v3/api-docs/) {
proxy_pass http://localhost:8080;
proxy_connect_timeout 150s;
}
location / {
try_files /view/404.html =404;
}
location ~ (/$|/view/|/ui/|/oauth2/) {
expires 0m;
proxy_pass http://localhost:8080;
proxy_connect_timeout 30s;
}
location ~ (/api/|/doc|/swagger-ui/|/v3/api-docs/) {
proxy_pass http://localhost:8080;
proxy_connect_timeout 150s;
}
location / {
try_files /view/404.html = 404;
}
}
6 changes: 4 additions & 2 deletions doc/config-nginx.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
В настройках nginx `cat /etc/nginx/nginx.conf` есть сканирование активных конфигураций: `include /etc/nginx/sites-enabled/*;`
В настройках nginx `cat /etc/nginx/nginx.conf` есть сканирование активных
конфигураций: `include /etc/nginx/sites-enabled/*;`
В каталоге `/etc/nginx/sites-enabled/` если линк на профиль по умолчанию: `ls -la /etc/nginx/sites-enabled/`
[Меняем его на наш профиль](https://unix.stackexchange.com/a/152000/216630):
[Меняем его на наш профиль](https://unix.stackexchange.com/a/152000/216630):

```
cd /etc/nginx/sites-enabled/
sudo ln -sfn /opt/jirarush/config/nginx.conf default
Expand Down
32 changes: 20 additions & 12 deletions doc/postgres-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
`sudo apt update`

#### [Установка и проверка docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04)
`sudo apt install docker.io`

или
`sudo apt install docker.io`

`sudo apt install apt-transport-https ca-certificates curl software-properties-common`
`curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`
`sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"`
`sudo apt install docker-ce` - установка
или

`sudo apt install apt-transport-https ca-certificates curl software-properties-common`
`curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`
`sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"`
`sudo apt install docker-ce` - установка

----

`sudo systemctl status docker` - проверка

#### [Запуск postgres в docker](https://hub.docker.com/_/postgres)
`sudo docker pull postgres` - установка образа postgres из репозитория docker hub
`sudo systemctl status docker` - проверка

#### [Запуск postgres в docker](https://hub.docker.com/_/postgres)

`sudo docker pull postgres` - установка образа postgres из репозитория docker hub

```
sudo docker run \
-p 5432:5432 \
Expand All @@ -29,7 +32,9 @@
-v ./pgdata:/var/lib/postgresql/data \
-d postgres
```

-- Запуск postgres в docker-контейнере, где:

```
-p 5432:5432 - порт, на котором запускается база данных
--name postgres-db - имя docker-контейнера
Expand All @@ -38,8 +43,11 @@
-e POSTGRES_DB=jira - название базы данных
-e PGDATA=/var/lib/postgresql/data/pgdata - папка, где будут храниться данные
```
`sudo docker update --restart unless-stopped postgres-db` - автозапуск контейнера после рестарта сервера
#### Креденшиалы для подключения к базе данных

`sudo docker update --restart unless-stopped postgres-db` - автозапуск контейнера после рестарта сервера

#### Креденшиалы для подключения к базе данных

```
1. host - ip-адрес сервера
2. port - 5432
Expand Down
1 change: 1 addition & 0 deletions lombok.config
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#https://stackoverflow.com/a/50287955/548473
lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
Loading