Skip to content

Commit e1b8ce1

Browse files
authored
Unite backend to module (#48)
1 parent 23aa92e commit e1b8ce1

File tree

58 files changed

+149
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+149
-138
lines changed

.github/workflows/gradle.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ on:
1212

1313
jobs:
1414
build:
15+
defaults:
16+
run:
17+
working-directory: ./backend
1518
runs-on: ubuntu-latest
1619
steps:
1720
- uses: actions/checkout@v3
1821

1922
- name: Lint OpenAPI Specifications
2023
uses: stoplightio/spectral-action@latest
2124
with:
22-
file_glob: '*/api/src/main/resources/static/openapi/api.yml'
23-
spectral_ruleset: config/.spectral.yaml
25+
file_glob: 'backend/*/api/src/main/resources/static/openapi/api.yml'
26+
spectral_ruleset: backend/config/.spectral.yaml
2427

2528
- name: Setup up JDK 20
2629
uses: actions/setup-java@v3

.gitignore

+1-32
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,2 @@
1-
# Compiled class file
2-
*.class
3-
4-
# Log file
5-
*.log
6-
7-
# BlueJ files
8-
*.ctxt
9-
10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
12-
13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
21-
22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
replay_pid*
25-
26-
# Maven
27-
target/
28-
29-
# Gradle
30-
build/
31-
.gradle/
1+
#ide
322
.idea
33-
.kotlin

backend/.gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
replay_pid*
25+
26+
# Gradle
27+
build/
28+
.gradle/
29+
.kotlin

LICENSE backend/LICENSE

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

backend/config/env/.env

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ITMO_DATING_MATCHMAKER_POSTGRES_DB="postgres"
2+
ITMO_DATING_MATCHMAKER_POSTGRES_USER="postgres"
3+
ITMO_DATING_MATCHMAKER_POSTGRES_PASSWORD="postgres"
4+
5+
ITMO_DATING_PEOPLE_POSTGRES_DB="postgres"
6+
ITMO_DATING_PEOPLE_POSTGRES_USER="postgres"
7+
ITMO_DATING_PEOPLE_POSTGRES_PASSWORD="postgres"

backend/config/env/local.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd "$(dirname "$0")"
2+
export $(cat .env | xargs)
File renamed without changes.

gradlew backend/gradlew

File renamed without changes.

gradlew.bat backend/gradlew.bat

+94-94
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
1-
@rem
2-
@rem Copyright 2015 the original author or authors.
3-
@rem
4-
@rem Licensed under the Apache License, Version 2.0 (the "License");
5-
@rem you may not use this file except in compliance with the License.
6-
@rem You may obtain a copy of the License at
7-
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
9-
@rem
10-
@rem Unless required by applicable law or agreed to in writing, software
11-
@rem distributed under the License is distributed on an "AS IS" BASIS,
12-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@rem See the License for the specific language governing permissions and
14-
@rem limitations under the License.
15-
@rem
16-
@rem SPDX-License-Identifier: Apache-2.0
17-
@rem
18-
19-
@if "%DEBUG%"=="" @echo off
20-
@rem ##########################################################################
21-
@rem
22-
@rem Gradle startup script for Windows
23-
@rem
24-
@rem ##########################################################################
25-
26-
@rem Set local scope for the variables with windows NT shell
27-
if "%OS%"=="Windows_NT" setlocal
28-
29-
set DIRNAME=%~dp0
30-
if "%DIRNAME%"=="" set DIRNAME=.
31-
@rem This is normally unused
32-
set APP_BASE_NAME=%~n0
33-
set APP_HOME=%DIRNAME%
34-
35-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
36-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37-
38-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40-
41-
@rem Find java.exe
42-
if defined JAVA_HOME goto findJavaFromJavaHome
43-
44-
set JAVA_EXE=java.exe
45-
%JAVA_EXE% -version >NUL 2>&1
46-
if %ERRORLEVEL% equ 0 goto execute
47-
48-
echo. 1>&2
49-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50-
echo. 1>&2
51-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52-
echo location of your Java installation. 1>&2
53-
54-
goto fail
55-
56-
:findJavaFromJavaHome
57-
set JAVA_HOME=%JAVA_HOME:"=%
58-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59-
60-
if exist "%JAVA_EXE%" goto execute
61-
62-
echo. 1>&2
63-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64-
echo. 1>&2
65-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66-
echo location of your Java installation. 1>&2
67-
68-
goto fail
69-
70-
:execute
71-
@rem Setup the command line
72-
73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74-
75-
76-
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78-
79-
:end
80-
@rem End local scope for the variables with windows NT shell
81-
if %ERRORLEVEL% equ 0 goto mainEnd
82-
83-
:fail
84-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85-
rem the _cmd.exe /c_ return code!
86-
set EXIT_CODE=%ERRORLEVEL%
87-
if %EXIT_CODE% equ 0 set EXIT_CODE=1
88-
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89-
exit /b %EXIT_CODE%
90-
91-
:mainEnd
92-
if "%OS%"=="Windows_NT" endlocal
93-
94-
:omega
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
18+
19+
@if "%DEBUG%"=="" @echo off
20+
@rem ##########################################################################
21+
@rem
22+
@rem Gradle startup script for Windows
23+
@rem
24+
@rem ##########################################################################
25+
26+
@rem Set local scope for the variables with windows NT shell
27+
if "%OS%"=="Windows_NT" setlocal
28+
29+
set DIRNAME=%~dp0
30+
if "%DIRNAME%"=="" set DIRNAME=.
31+
@rem This is normally unused
32+
set APP_BASE_NAME=%~n0
33+
set APP_HOME=%DIRNAME%
34+
35+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
36+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37+
38+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40+
41+
@rem Find java.exe
42+
if defined JAVA_HOME goto findJavaFromJavaHome
43+
44+
set JAVA_EXE=java.exe
45+
%JAVA_EXE% -version >NUL 2>&1
46+
if %ERRORLEVEL% equ 0 goto execute
47+
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
53+
54+
goto fail
55+
56+
:findJavaFromJavaHome
57+
set JAVA_HOME=%JAVA_HOME:"=%
58+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59+
60+
if exist "%JAVA_EXE%" goto execute
61+
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
67+
68+
goto fail
69+
70+
:execute
71+
@rem Setup the command line
72+
73+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74+
75+
76+
@rem Execute Gradle
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78+
79+
:end
80+
@rem End local scope for the variables with windows NT shell
81+
if %ERRORLEVEL% equ 0 goto mainEnd
82+
83+
:fail
84+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85+
rem the _cmd.exe /c_ return code!
86+
set EXIT_CODE=%ERRORLEVEL%
87+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
88+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89+
exit /b %EXIT_CODE%
90+
91+
:mainEnd
92+
if "%OS%"=="Windows_NT" endlocal
93+
94+
:omega
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

settings.gradle.kts backend/settings.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
33
}
44

5-
rootProject.name = "itmo-dating"
5+
rootProject.name = "itmo-dating-backend"
66

77
include(
88
":common",

compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22
matchmaker:
33
image: eclipse-temurin:21-jdk-alpine
44
volumes:
5-
- ./matchmaker/app/build/libs/matchmaker-app-1.0.0.jar:/matchmaker.jar
5+
- ./backend/matchmaker/app/build/libs/matchmaker-app-1.0.0.jar:/matchmaker.jar
66
command: java -jar /matchmaker.jar
77
environment:
88
POSTGRES_DB: ${ITMO_DATING_MATCHMAKER_POSTGRES_DB?:err}
@@ -27,7 +27,7 @@ services:
2727
people:
2828
image: eclipse-temurin:21-jdk-alpine
2929
volumes:
30-
- ./people/app/build/libs/people-app-1.0.0.jar:/people.jar
30+
- ./backend/people/app/build/libs/people-app-1.0.0.jar:/people.jar
3131
command: java -jar /people.jar
3232
environment:
3333
POSTGRES_DB: ${ITMO_DATING_PEOPLE_POSTGRES_DB?:err}

config/env/local.sh

-7
This file was deleted.

itmo-dating.iml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="sourceFolder" forTests="false" />
7+
</component>
8+
</module>

0 commit comments

Comments
 (0)