From dd10e59be3864c712776bac6022b6d19a387555b Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Wed, 11 Feb 2026 09:03:56 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D0=B0=D0=BD=D0=B4=D0=B0=D1=80?= =?UTF-8?q?=D1=82=D0=BD=D1=8B=D0=B5=20=D1=81=D1=80=D0=B5=D0=B4=D1=81=D0=B2?= =?UTF-8?q?=D1=82=D0=B0=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 12 +++ build/Dockerfile | 15 ++++ build/docker-compose.yml | 17 ++++ pom.xml | 118 +++++++++++++++++++++++++++ src/main/java/im/rosetta/Main.java | 7 ++ target/classes/im/rosetta/Main.class | Bin 0 -> 538 bytes 6 files changed, 169 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 build/Dockerfile create mode 100644 build/docker-compose.yml create mode 100644 pom.xml create mode 100644 src/main/java/im/rosetta/Main.java create mode 100644 target/classes/im/rosetta/Main.class diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9052b9c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/.DS_Store": true, + "**/Thumbs.db": true, + ".DS_Store": true, + "._*": true, + "**/._*": true + } +} \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..215a234 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,15 @@ +FROM eclipse-temurin:21-jre-alpine + +WORKDIR /app + +# Копируем готовый JAR со всеми зависимостями +COPY app.jar ./app.jar + +# Создаём директорию для хранения файлов +RUN mkdir -p files + +# Открываем порт (может быть переопределён через ENV) +EXPOSE ${PORT:-8080} + +# Запускаем приложение с портом из окружения +CMD ["sh", "-c", "java -jar app.jar ${PORT:-8080}"] \ No newline at end of file diff --git a/build/docker-compose.yml b/build/docker-compose.yml new file mode 100644 index 0000000..664d2f6 --- /dev/null +++ b/build/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + rosetta-cdn: + build: + context: . + dockerfile: Dockerfile + container_name: rosetta-cdn + ports: + - "${PORT:-8080}:${PORT:-8080}" + environment: + - PORT=${PORT:-8080} + volumes: + # Монтируем директории обновлений для автоматического подхвата изменений + # И чтобы папка files была доступна из FTP например для ручного удаления файлов + - ./files:/app/files + restart: unless-stopped diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..d1a0f85 --- /dev/null +++ b/pom.xml @@ -0,0 +1,118 @@ + + + 4.0.0 + + im.rosetta + rosetta-cdn + 1.0-SNAPSHOT + + + 21 + 21 + 3.1.5 + + + + + org.glassfish.jersey.containers + jersey-container-grizzly2-http + ${jersey.version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey.version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey.version} + + + org.slf4j + slf4j-simple + 2.0.12 + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.6.0 + + + package + + single + + + + + im.rosetta.Main + + + + jar-with-dependencies + + app + false + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.3.2 + + + pre-clean + + true + + + ${project.basedir}/build + + classes/ + + + + + + clean + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 3.1.0 + + + package + + + + + + + + + run + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/im/rosetta/Main.java b/src/main/java/im/rosetta/Main.java new file mode 100644 index 0000000..70dda04 --- /dev/null +++ b/src/main/java/im/rosetta/Main.java @@ -0,0 +1,7 @@ +package im.rosetta; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/target/classes/im/rosetta/Main.class b/target/classes/im/rosetta/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..a07f8ce44ee2f5480501e3d87acaed8575dc834a GIT binary patch literal 538 zcmZuuOHTqZ5dO+**>#nd;9J2HcyNy%Feb*tcvv3^hKr{H4VLU~O(`0GmL4?m;1BRe z8K+=EG+bsnGyNW&etmy@0yxFKgA_wS#(`F2VGIv0xl9~n7>XnQ$b*O{!{E9%5`Dvv zJC=zwCk*LktILo%Qv=~44cA8&IpPUrBCaNJPv~3Tiv&YCRDB+Gxt6y6ZD!2995a-{ zf3j_&j7grM*1QYn@*SgPGHkcHE=s64DE~3nc^(@P`&dPljHwCvtj@qv1vi8=gcm$+ z=ds4%Ux+AD^(UpHLBqoawj69SRHkZw0Y0{|!{9tvj)+`Un~O}5X|9L#p2`Bx3|>b~ zbYGlHyAIcG_t0vg0dh-!0Ho+d>!avU6;NiBvj^|Uzf8v-MLPxomMHqO3zV0sa