commit dd10e59be3864c712776bac6022b6d19a387555b Author: RoyceDa Date: Wed Feb 11 09:03:56 2026 +0200 Стандартные средсвта сборки 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 0000000..a07f8ce Binary files /dev/null and b/target/classes/im/rosetta/Main.class differ