Skip to content
Merged
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
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ include 'formatter'
// NOTE The logviewer does not properly work as of today.
// But it is causing major build slowdowns, so we exclude it for the time being.
// include 'logviewer'
include 'website'

27 changes: 27 additions & 0 deletions website/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id "com.google.cloud.tools.jib" version "3.1.4"
id 'java'
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
}

var outputImage = 'togetherjava.duckdns.org:5001/togetherjava/website:' + System.getenv('BRANCH_NAME') ?: 'latest'

jib {
from.image = 'eclipse-temurin:18'
to {
image = outputImage
auth {
username = System.getenv('REGISTRY_USER') ?: ''
password = System.getenv('REGISTRY_PASSWORD') ?: ''
}
}
container {
setPorts(["5051"].asList())
setCreationTime(Instant.now().toString())
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.togetherjava.tjbot.website;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
* Spring boot application to serve the bots welcome webpage.
*/
@SpringBootApplication
public class Application {
/**
* Starts the application.
*
* @param args Not supported
*/
public static void main(final String[] args) {
SpringApplication.run(Application.class, args);
}
}
1 change: 1 addition & 0 deletions website/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server.port=5051
12 changes: 12 additions & 0 deletions website/src/main/resources/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Together Java</title>
</head>
<body>
<h1>Hello from Together Java</h1>
Visit us at: <a href="https://discord.gg/P3UmanFmvK">discord.gg/P3UmanFmvK</a>
</body>
</html>