diff --git a/.env b/.env new file mode 100644 index 0000000000000000000000000000000000000000..bd638b3cf5f4f8883ed1967b0600e728839c8cad --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +MYSQL_ROOT_PASSWORD=mysql +MYSQL_DATABASE=mysql_database +MYSQL_USER=mysql +MYSQL_PASSWORD=mysql +USE_DOCKER_CONFIG=true \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f3ba9b1d600f4802c066895116846cad849f3f10..361d0406a0e61de03fbd7f09efd317792f1bc524 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,20 +5,25 @@ </component> <component name="ChangeListManager"> <list default="true" id="2f4df769-1e8e-461a-b992-6a5f52688557" name="Changes" comment=""> - <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/docker-compose.yml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/main/java/org/example/Main.java" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/.env" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/src/main/java/App.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/docker-compose.yml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/main/java/org/example/Main.java" beforeDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="LAST_RESOLUTION" value="IGNORE" /> </component> + <component name="FileTemplateManagerImpl"> + <option name="RECENT_TEMPLATES"> + <list> + <option value="Class" /> + </list> + </option> + </component> <component name="Git.Settings"> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> </component> @@ -31,22 +36,22 @@ <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> - <component name="PropertiesComponent"><![CDATA[{ - "keyToString": { - "Downloaded.Files.Path.Enabled": "false", - "Repository.Attach.Annotations": "false", - "Repository.Attach.JavaDocs": "false", - "Repository.Attach.Sources": "false", - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "WebServerToolWindowFactoryState": "false", - "last_opened_file_path": "D:/Kuliah/Semester 5/WBD/Tubes 2/soap-service", - "nodejs_package_manager_path": "npm", - "project.structure.last.edited": "Modules", - "project.structure.proportion": "0.15", - "project.structure.side.proportion": "0.2" + <component name="PropertiesComponent">{ + "keyToString": { + "Downloaded.Files.Path.Enabled": "false", + "Repository.Attach.Annotations": "false", + "Repository.Attach.JavaDocs": "false", + "Repository.Attach.Sources": "false", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "WebServerToolWindowFactoryState": "false", + "last_opened_file_path": "D:/Kuliah/Semester 5/WBD/Tubes 2/soap-service", + "nodejs_package_manager_path": "npm", + "project.structure.last.edited": "Modules", + "project.structure.proportion": "0.15", + "project.structure.side.proportion": "0.2" } -}]]></component> +}</component> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> <component name="TaskManager"> <task active="true" id="Default" summary="Default task"> @@ -57,7 +62,8 @@ <updated>1698033269713</updated> <workItem from="1698033271082" duration="8917000" /> <workItem from="1698212854323" duration="805000" /> - <workItem from="1698234815774" duration="2625000" /> + <workItem from="1698234815774" duration="2793000" /> + <workItem from="1698239223999" duration="6070000" /> </task> <servers /> </component> diff --git a/Dockerfile b/Dockerfile index 4f3cbd965741a22bf9af4fe3a154c31a1681e641..74488015d9877fee7b922ab51484083b498d0193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:11 +FROM openjdk:21 COPY ./target /app WORKDIR /app EXPOSE 3030 diff --git a/docker-compose.yml b/docker-compose.yml index 0393a58b2973de42428f51dc96d8098fb66a0c8f..747ea55e8ac5f25d37f0a6ea7f5f65bebd0771ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,5 +3,26 @@ services: soap-service: container_name: soap-srv-container image: soap-tubes2:latest + env_file: .env ports: - - "3030:3030" + - "3030:80" + depends_on: + - soap-db + soap-db: + container_name: soap-db-container + image: mysql + restart: unless-stopped + volumes: + - ./migration/service-soap.sql:/docker-entrypoint-initdb.d/schema.sql:ro + env_file: .env + ports: + - "3040:3306" + phpmyadmin: + container_name: soap-srv-pma + image: phpmyadmin + depends_on: + - soap-db + environment: + PMA_HOST: soap-db + ports: + - "4030:80" \ No newline at end of file diff --git a/migration/service-soap.sql b/migration/service-soap.sql new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391